R learner node

Hi,

I'm trying to use R in KNIME and specifically R learner node so that i can write R code in KNIME. It seems like R learner works like R studio where i can evaluate my script at each step as well. But I don't know how to use Knime.in command and use R learner node. Plz help

The 006001_R_example available on the KNIME server (cf. 006_R Integration folder) nicely illustrates how to use of the R nodes.

If you just want to use R for a specific procedure, which only requires one input table and produces one output data.frame, you should use the R snippet node. R Learner and R Predictor allow you to build a learner in R with a training set and to apply it for prediction on another set, exactly in the same fashion as you would do with "pure" KNIME nodes. R View can be used to return a graphics object generated in R.

Table to R is particularly useful together with Add Table to R, for that allows you to merge inputs of several sources in R, do something in R, and then serve the output back to KNIME using Table to R. The real power of the KNIME R integration resides probably in these nodes.

Finally, even though it should not be considered best practice the context of KNIME's R integration, you can always read data from and save data to elsewhere within the R nodes using the required R functions. Personally, I tend to avoid doing too much within R when I'm working with KNIME, which offers superior comfort for data wrangling. My current use cases are the e1071 (NaiveBayes), wordcloud and ggplot libraries.

Has anyone used this package with KNIME?

Would love to see an example of how you set this up.

Is there an equivalent in Python?

With knime and R you could also just use the snippet and store everything from within the R code.

The R model writer is there for convenience.

You could also export some models as PMML files from R and store and use them in KNIME.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.