美文网首页
调用R包时:could not find function报错,

调用R包时:could not find function报错,

作者: CuteCurse | 来源:发表于2019-07-18 11:26 被阅读0次
回答来自:https://stackoverflow.com/questions/7027288/error-could-not-find-function-in-r
检查:function name > 是否install包含这个 function的包(install.packages("package name"))>是否load/attcah这个包到当前工作环境(require(package name)/ library(package name))>也许需要一个更换一个R版本 to make some fucntions available >寻找 function 位置 命名空间出错:->可能这是 internal function ,use ::: to call such function

example:

-getAnywhere(tobit)
-help.search("funciton name") / ??function name / getAnywhere(function name)
-A single object matching ‘tobit’ was found.It was found in the following places namespace:VGAM(find namespace)
-HSMM <- newCellDataSet(as.matrix(HSMM_expr_matrix),
-+ phenoData = pd,
-+ featureData = fd,
-+ lowerDetectionLimit=0.1,
-+ expressionFamily=VGAM:::tobit(Lower=0.1))
OK!

1 If you have no clue about the package, you can use findFn in the sos package as explained in this answer.
2 RSiteSearch("some.function") or searching with rdocumentation or rseek are alternative ways to find the function.

相关文章

网友评论

      本文标题:调用R包时:could not find function报错,

      本文链接:https://www.haomeiwen.com/subject/samklctx.html