我有以下功能作为示例:
myFunc <- function(x){
while(x < 100){
x <- x+10
cat( x )
cat("\n")
}
}
在Windows上的新R版本3.4.1中,我想从 myFunc.R 文件中获取此函数,如下所示:
filepath <- "D:/"
l <- list.files(filepath, pattern = "my", full.names = TRUE)
source(l)
但是我收到以下错误:
source(l) Error in source(l) : could not find symbol "exprs" in environment of the generic function
我希望任何人都可以提供帮助。非常感谢