Skip to content

Commit 2353854

Browse files
committed
dont run doParallel in tests
1 parent 5ddd011 commit 2353854

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

R/impute.R

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,20 @@
2626
#' iris_na[sample(1:nrow(iris), 5), j] <- NA
2727
#' }
2828
#'
29-
#' # Parallelization with doParallel
30-
#' doParallel::registerDoParallel(cores = 2)
31-
#'
3229
#' # Single imputation
3330
#' iris_imputed <- arf::impute(iris_na, m = 1)
3431
#'
3532
#' # Multiple imputation
3633
#' iris_imputed <- arf::impute(iris_na, m = 20)
34+
#'
35+
#' \dontrun{
36+
#' # Parallelization with doParallel
37+
#' doParallel::registerDoParallel(cores = 4)
38+
#'
39+
#' # ... or with doFuture
40+
#' doFuture::registerDoFuture()
41+
#' future::plan("multisession", workers = 4)
42+
#' }
3743
impute <- function(x,
3844
m = 1,
3945
expectation = ifelse(m==1, TRUE, FALSE),

man/impute.Rd

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)