diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2021-01-22 14:40:42 +0100 | 
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-01-22 14:40:42 +0100 | 
| commit | 48ff25ee8114a5193c67e96e031ff836d4b719c3 (patch) | |
| tree | e518e3b17c2f7b00735c7fbc669798195301decd | |
| parent | 4e37669ac2ad3b3138480c3209f414101469fac7 (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.
| -rw-r--r-- | R/saem.R | 13 | ||||
| -rw-r--r-- | man/saem.Rd | 4 | 
2 files changed, 1 insertions, 16 deletions
| @@ -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)    }) diff --git a/man/saem.Rd b/man/saem.Rd index 775a8e7b..d5a8f17e 100644 --- a/man/saem.Rd +++ b/man/saem.Rd @@ -18,7 +18,6 @@ saem(object, ...)    control = list(displayProgress = FALSE, print = FALSE, save = FALSE, save.graphs =      FALSE),    verbose = FALSE, -  suppressPlot = TRUE,    quiet = FALSE,    ...  ) @@ -59,9 +58,6 @@ automatic choice is not desired}  \item{verbose}{Should we print information about created objects of  type \link[saemix:SaemixModel-class]{saemix::SaemixModel} and \link[saemix:SaemixData-class]{saemix::SaemixData}?} -\item{suppressPlot}{Should we suppress any plotting that is done -by the saemix function?} -  \item{quiet}{Should we suppress the messages saemix prints at the beginning  and the end of the optimisation process?} | 
