aboutsummaryrefslogtreecommitdiff
path: root/R/mmkin.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-19 15:41:24 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-19 15:41:24 +0100
commitdb9ae6a0c9cecb92048fde6f06af1da183c09b5f (patch)
treef0ea97545549c71bd7aa3d13afed422fd402f0e6 /R/mmkin.R
parent6441a9f35d66f2c4d38c0036f99cd8f509d76f3b (diff)
Depend on parallel, doc improvements
By depending on parallel instead of importing it, functions to set up and stop a cluster are always available when mkin is loaded. The use of multicore processing in mmkin on Windows is now documented in the help file, which brings mkin closer to a version 1.0 #9.
Diffstat (limited to 'R/mmkin.R')
-rw-r--r--R/mmkin.R11
1 files changed, 11 insertions, 0 deletions
diff --git a/R/mmkin.R b/R/mmkin.R
index 96453e1d..bb111efe 100644
--- a/R/mmkin.R
+++ b/R/mmkin.R
@@ -60,6 +60,17 @@
#' # Plotting with mmkin (single brackets, extracting an mmkin object) does not
#' # allow to plot the observed variables separately
#' plot(fits.0[1, 1])
+#'
+#' # On Windows, we can use multiple cores by making a cluster using the parallel
+#' # package, which gets loaded with mkin, and passing it to mmkin, e.g.
+#' cl <- makePSOCKcluster(12)
+#' f <- mmkin(c("SFO", "FOMC", "DFOP"),
+#' list(A = FOCUS_2006_A, B = FOCUS_2006_B, C = FOCUS_2006_C, D = FOCUS_2006_D),
+#' cluster = cl, quiet = TRUE)
+#' print(f)
+#' # We get false convergence for the FOMC fit to FOCUS_2006_A because this
+#' # dataset is really SFO, and the FOMC fit is overparameterised
+#' stopCluster(cl)
#' }
#'
#' @export mmkin

Contact - Imprint