我使用以下命令创建模型树:
Tree_Model <- RWeka::M5P(Formule_Train, data = AB_Train)
然后,以下行在Rmd文件中的R块内正常运行:
Tree_Model_Test <- predict(Tree_Model, newdata=AB_Test)
但是当我尝试编织文档时,出现此错误:
Error in .jcall(o, "Ljava/lang/Class;", "getClass") :
RcallMethod: attempt to call a method of a NULL object.
Calls: <Anonymous> ... .predictions_for_instances -> .has_method -> .jcall
有什么建议吗?
答案 0 :(得分:0)
换行后
Tree_Model <- RWeka::M5P(Formule_Train, data = AB_Train)
到
library(RWeka)
Tree_Model <- M5P(Formule_Train, data = AB_Train)
编织者不再抱怨
本
7分钟后,我得到了与以前相同的错误:-(