aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-01-22 14:40:42 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2021-01-22 14:40:42 +0100
commit48ff25ee8114a5193c67e96e031ff836d4b719c3 (patch)
treee518e3b17c2f7b00735c7fbc669798195301decd /R
parent4e37669ac2ad3b3138480c3209f414101469fac7 (diff)
We do not need to suppress saemix plots any more
This makes fitting with saem within parallel::mclapply much faster and, surprisingly, much less hungry for RAM.
Diffstat (limited to 'R')
-rw-r--r--R/saem.R13
1 files changed, 1 insertions, 12 deletions
diff --git a/R/saem.R b/R/saem.R
index ffdd5503..fd2a77b4 100644
--- a/R/saem.R
+++ b/R/saem.R
@@ -28,8 +28,6 @@ utils::globalVariables(c("predicted", "std"))
#' automatic choice is not desired
#' @param quiet Should we suppress the messages saemix prints at the beginning
#' and the end of the optimisation process?
-#' @param suppressPlot Should we suppress any plotting that is done
-#' by the saemix function?
#' @param control Passed to [saemix::saemix]
#' @param \dots Further parameters passed to [saemix::saemixModel].
#' @return An S3 object of class 'saem.mmkin', containing the fitted
@@ -109,7 +107,7 @@ saem.mmkin <- function(object,
solution_type = "auto",
control = list(displayProgress = FALSE, print = FALSE,
save = FALSE, save.graphs = FALSE),
- verbose = FALSE, suppressPlot = TRUE, quiet = FALSE, ...)
+ verbose = FALSE, quiet = FALSE, ...)
{
transformations <- match.arg(transformations)
m_saemix <- saemix_model(object, verbose = verbose,
@@ -117,15 +115,6 @@ saem.mmkin <- function(object,
transformations = transformations, ...)
d_saemix <- saemix_data(object, verbose = verbose)
- if (suppressPlot) {
- # We suppress the log-likelihood curve that saemix currently
- # produces at the end of the fit by plotting to a file
- # that we discard afterwards
- tmp <- tempfile()
- grDevices::png(tmp)
- on.exit(grDevices::dev.off())
- on.exit(unlink(tmp), add = TRUE)
- }
fit_time <- system.time({
utils::capture.output(f_saemix <- saemix::saemix(m_saemix, d_saemix, control), split = !quiet)
})

Contact - Imprint