- errors <- mclapply(1:N,
- function(n) {
- compareToCV(df, t_idx, task, n, verbose=FALSE, ...) },
- mc.cores = nc)
+ compareOne <- function(n) {
+ print(n)
+ compareToCV(df, t_idx, task, n, verbose=FALSE, ...)
+ }
+ errors <- if (nc >= 2) {
+ mclapply(1:N, compareOne, mc.cores = nc)
+ } else {
+ lapply(1:N, compareOne)
+ }