0

I'm trying to Knit an Rmd file to Word, and keep encountering the following error message:

Error Message from RStudio

My line 28 is as follows:

NN <- make_Weka_filter("weka/filters/unsupervised/attribute/NumericToNominal")

I use NN later to apply the filter function to my testing and training data (I'm attempting a classification model for the Federalist papers)

trainfed <- NN(data=trainfed, control= Weka_control(R="1-3"), na.action = NULL)
testfed <- NN(data=testfed, control= Weka_control(R="1,3"), na.action = NULL)

When I run all of this either in blocks in my instance of RStudio, or just line by line - I have no issues. I can view the output in window, in line, and even in the viewer pane.

However, as soon as I start to try to Knit to Word I get the error mentioned above.

Is it possible to Knit to Word with RWeka package in use? I've seen many of these filed, but never really one with an answer to the error in finding the function on whatever instance Rmarkdown Knits from...

Can anybody advise? Thank you!

user2554330
  • 37,248
  • 4
  • 43
  • 90
natehoffy
  • 1
  • 2
  • Thanks. Do you have a resolution, though? – natehoffy May 21 '18 at 00:53
  • When you add a library(RWeka) call, or any library call for that matter, to a Rmd file & try to knit that file you will get a message *similar* to the following: Error: package or namespace load failed for 'RWeka': .onLoad failed in loadNamespace() for 'rJava', details: call:......... and it goes on and on and on. The reason is, generally, the Knit occurs in a different instance of R. That instance clearly has an issue with rJava and probably lots of other package install problems. There are a few Stack Overflow tix on that already. Thanks for the suggestion, though, Any other ideas? – natehoffy May 22 '18 at 16:38
  • Downvote, user2554330. library throws an error, which I shared. If you don't have constructive feedback; please allow others who do to comment. Saying: "that's the only way to do it" when I share the specific error I get when I do it is not a productive discussion or solution. – natehoffy May 24 '18 at 00:16

0 Answers0