我正在尝试应用简单的foreach
命令但是我收到以下错误:
library(foreach)
x <- foreach(i=1:3) %do% sqrt(i)
Error in mayCallBrowser (e, cntxt):
Could not find function "mayCallBrowser"
我无法在其他任何地方找到相同的错误按摩。关于如何解决的任何建议?
更新:完整输出+ traceback()
> x <- foreach(i=1:3) %do% sqrt(i)
Error in mayCallBrowser(e, cntxt) :
could not find function "mayCallBrowser"
Note: no visible binding for global variable 'pos'
> traceback()
3: comp(expr, env = envir, options = list(suppressUndefined = TRUE))
2: e$fun(obj, substitute(ex), parent.frame(), e$data)
1: foreach(i = 1:3) %do% sqrt(i)