|
13 | 13 | #' and fit the specified HMM to each imputation of the data. The vast majority of \code{MIfitHMM} arguments are identical to the corresponding arguments from these functions. |
14 | 14 | #' |
15 | 15 | #' If \code{miData} is a \code{\link{crwData}} or \code{\link{crwHierData}} object, \code{nSims} determines both the number of realizations of the position process to draw |
16 | | -#' (using \code{\link[crawl]{crwSimulator}} and \code{\link{crwPostIS}}) as well as the number of HMM fits. |
| 16 | +#' (using \code{\link[crawl]{crwSimulator}} and \code{\link[crawl]{crwPostIS}}) as well as the number of HMM fits. |
17 | 17 | #' |
18 | 18 | #' If \code{miData} is a \code{\link{crwSim}} (or \code{\link{crwHierSim}}) object or a list of \code{\link{momentuHMMData}} (or \code{\link{momentuHierHMMData}}) object(s), the specified HMM will simply be fitted to each of the \code{momentuHMMData} (or \code{momentuHierHMMData}) objects |
19 | 19 | #' and all arguments related to \code{\link[crawl]{crwSimulator}}, \code{\link[crawl]{crwPostIS}}, or \code{\link{prepData}} are ignored. |
@@ -262,7 +262,11 @@ MIfitHMM.default<-function(miData,nSims, ncores = 1, poolEstimates = TRUE, alpha |
262 | 262 | } |
263 | 263 | oldDoPar <- doFuture::registerDoFuture() |
264 | 264 | on.exit(with(oldDoPar, foreach::setDoPar(fun=fun, data=data, info=info)), add = TRUE) |
265 | | - future::plan(future::multisession, workers = ncores) |
| 265 | + if (Sys.getenv("CI") == "true" && grepl("macOS", Sys.getenv("RUNNER_OS"))) { |
| 266 | + future::plan(future::sequential) |
| 267 | + } else { |
| 268 | + future::plan(future::multisession, workers = ncores) |
| 269 | + } |
266 | 270 | # hack so that foreach %dorng% can find internal momentuHMM variables without using ::: (forbidden by CRAN) |
267 | 271 | progBar <- progBar |
268 | 272 | pkgs <- c("momentuHMM") |
@@ -553,7 +557,11 @@ MIfitHMM.hierarchical<-function(miData,nSims, ncores = 1, poolEstimates = TRUE, |
553 | 557 | } |
554 | 558 | oldDoPar <- doFuture::registerDoFuture() |
555 | 559 | on.exit(with(oldDoPar, foreach::setDoPar(fun=fun, data=data, info=info)), add = TRUE) |
556 | | - future::plan(future::multisession, workers = ncores) |
| 560 | + if (Sys.getenv("CI") == "true" && grepl("macOS", Sys.getenv("RUNNER_OS"))) { |
| 561 | + future::plan(future::sequential) |
| 562 | + } else { |
| 563 | + future::plan(future::multisession, workers = ncores) |
| 564 | + } |
557 | 565 | # hack so that foreach %dorng% can find internal momentuHMM variables without using ::: (forbidden by CRAN) |
558 | 566 | progBar <- progBar |
559 | 567 | pkgs <- c("momentuHMM","data.tree","TMB") |
|
0 commit comments