I was trying to run one of the workflow demos called “01_Example_of_R_Snippet” from the EXAMPLES (knime://EXAMPLES/) and the second node (R Source Workspace - Read Date) did not run.
I discovered that this line
library(RevoScaleR)
is the cause of the error. It seems I do not have this package. My question is how do I install this since it seems KNIME install another R.
I solved a similar problem to ensure a library was installed by putting the following snippet at the start of my R code block, in this case for the sm library:
s = getOption("repos") # hard code the UK repo for CRAN
s["CRAN"] = "http://cran.uk.r-project.org"
options(repos = s)
rm(s)
install.packages("sm")
library(sm)
I think you should be able to adapt it to ensure that the relevant package is installed into the R instance which KNIME uses. I can’t remember the details as to why I needed to hardcode the UK cran repository unfortunately!