diff --git a/R/writeMixtureInfo.R b/R/writeMixtureInfo.R index 187e793..54e4556 100644 --- a/R/writeMixtureInfo.R +++ b/R/writeMixtureInfo.R @@ -26,8 +26,9 @@ writeMixtureInfo <- function( fid <- load(outPutFile) } else { fid <- -1 - # TODO: replace sink with option that will record input and output - sink("baps4_output.baps", split = TRUE) # save in text anyway. + outPutFile <- file.path(tempdir(), "baps4_output.baps") + message("Output saved to", outPutFile) + sink(outPutFile, split = TRUE) # save in text anyway. } dispLine() @@ -331,5 +332,9 @@ writeMixtureInfo <- function( } } } + # Closing sink(s) + while (sink.number() > 0L) { + sink() + } return(changesInLogml) }