Skip to content

Commit

Permalink
Fixed sink() usage
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Sep 11, 2023
1 parent 70ec460 commit 2b75657
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/writeMixtureInfo.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -331,5 +332,9 @@ writeMixtureInfo <- function(
}
}
}
# Closing sink(s)
while (sink.number() > 0L) {
sink()
}
return(changesInLogml)
}

0 comments on commit 2b75657

Please sign in to comment.