我想知道为什么会这样(例如,机器架构,软件细节等)
我已成功实施:
# it will NOT work on Windows:
# check if "parallel" is installed
if (!"parallel" %in% rownames(installed.packages())) {install.packages("parallel")}
# attempt to use the "mclapply"
res_out <- mclapply(1:10, function(i) {bb <- i ^ 2; return(bb)})
# see the result
print(unlist(res_out))
我目前没有Windows,但是我相信代码不会像我们在Windows 10上所尝试的那样在Windows上运行。