File: options.R

package info (click to toggle)
r-cran-domc 1.3.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 284 kB
  • sloc: sh: 33; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
test01 <- function() {
  x <- list(1:3, 1:9, 1:19)
  cs <- 1:20

  for (chunkSize in cs) {
    mcopts <- list(preschedule=FALSE)
    for (y in x) {
      actual <- foreach(i=y, .options.multicore=mcopts) %dopar% i
      checkEquals(actual, as.list(y))
      actual <- foreach(i=y, .combine='c', .options.multicore=mcopts) %do% i
      checkEquals(actual, y)
    }
  }
}