【发布时间】:2013-10-28 09:49:48
【问题描述】:
我需要使用Rscript 通过bash shell 运行几个脚本,而我使用的一些函数需要isGeneric 函数。但是,在这种情况下,流程会像这样结束(例如):
Error in .getLogLik() : could not
find function "isGeneric"
Calls: main -> dredge -> .getLik -> .getLogLik
Execution halted
这可以复制如下
# in the bash shell
echo "isGeneric('apply')" > /tmp/test.R
Rscript /tmp/test.R
结果:
Error: could not find function "isGeneric"
Execution halted
但是,如果我们打开一个 R 会话并输入以下内容,它会起作用:
# in the R shell
isGeneric('apply')
[1] FALSE
您知道问题出在哪里以及如何解决吗?
【问题讨论】: