0

I create a Model-tree with the following command:

Tree_Model <- RWeka::M5P(Formule_Train, data = AB_Train)

Then the following line executes fine inside a R-chunk in a Rmd-file:

Tree_Model_Test <- predict(Tree_Model, newdata=AB_Test)

But when I try to knit the document, I get this error:

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

Any suggestions?

Ben Engbers
  • 433
  • 3
  • 12

1 Answers1

0

After changing the line

Tree_Model <- RWeka::M5P(Formule_Train, data = AB_Train)

to

library(RWeka)
Tree_Model <- M5P(Formule_Train, data = AB_Train)

knitr didn't complain anymore

Ben

And 7 minutes later I got the same error as before :-(

Ben Engbers
  • 433
  • 3
  • 12