aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-04-21 16:40:50 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2021-04-21 16:40:50 +0200
commit9907f17aa98bddfe60e82a71c70a2fea914a02f7 (patch)
tree4d5d959cdd19f32068bae406372df4b8a8f59fd6 /R
parent34d1c5f23edfb60548bc5a9dd99c2f3af92acef1 (diff)
parentc74b79c983fe9fc872bac1262040e82f16049477 (diff)
Merge branch 'master' into saemix
Diffstat (limited to 'R')
-rw-r--r--R/mmkin.R5
-rw-r--r--R/plot.mkinfit.R2
2 files changed, 4 insertions, 3 deletions
diff --git a/R/mmkin.R b/R/mmkin.R
index 030fb27b..fe04129e 100644
--- a/R/mmkin.R
+++ b/R/mmkin.R
@@ -13,7 +13,8 @@
#' is only used when the \code{cluster} argument is \code{NULL}. On Windows
#' machines, cores > 1 is not supported, you need to use the \code{cluster}
#' argument to use multiple logical processors. Per default, all cores
-#' detected by [parallel::detectCores()] are used.
+#' detected by [parallel::detectCores()] are used, except on Windows where
+#' the default is 1.
#' @param cluster A cluster as returned by \code{\link{makeCluster}} to be used
#' for parallel execution.
#' @param \dots Further arguments that will be passed to \code{\link{mkinfit}}.
@@ -75,7 +76,7 @@
#'
#' @export mmkin
mmkin <- function(models = c("SFO", "FOMC", "DFOP"), datasets,
- cores = parallel::detectCores(), cluster = NULL, ...)
+ cores = if (Sys.info()["sysname"] == "Windows") 1 else parallel::detectCores(), cluster = NULL, ...)
{
call <- match.call()
parent_models_available = c("SFO", "FOMC", "DFOP", "HS", "SFORB", "IORE", "logistic")
diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R
index 2e319aae..1d4ea543 100644
--- a/R/plot.mkinfit.R
+++ b/R/plot.mkinfit.R
@@ -278,7 +278,7 @@ plot.mkinfit <- function(x, fit = x,
if (show_residuals) {
mkinresplot(fit, obs_vars = row_obs_vars, standardized = standardized,
pch_obs = pch_obs[row_obs_vars], col_obs = col_obs[row_obs_vars],
- legend = FALSE, frame = frame, xlab = xlab)
+ legend = FALSE, frame = frame, xlab = xlab, xlim = xlim)
}
# Show error model plot if requested

Contact - Imprint