我正在尝试为here发布的doSMP运行示例:

require(plyr) # make sure you have 1.2 or later installed
x <- seq_len(20)
wait <- function(i) Sys.sleep(0.1)
system.time(llply(x, wait))
require(doSMP)
workers <- startWorkers(2) # My computer has 2 cores
registerDoSMP(workers)
system.time(llply(x, wait, .parallel = TRUE))


并且我收到以下警告:

Warning messages:
1: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’

2: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’


这些警告是什么意思,我应该担心它们吗?

编辑:

getRversion() = 2.12.2
packageDescription("plyr", fields="Version") = 1.4
packageDescription("doSMP", fields="Version") = 1.0-1

最佳答案

您正在使用Windows吗?
我在Linux上遇到相同的错误。
并且与doSNOW相同的错误。

然后,我尝试使用doMC而不是doSMP,但工作正常。

关于r - 帮助奇数plyr/doSMP警告,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5545084/

10-10 15:05