R into Knime: error R home is invalid

Hi!
I need to user R into Knime, reading a csv.
how can I start? with the node R source (table)? Inside of this node I put my code:

install.packages(“tidyverse”)
library(tidyverse)
setwd(“D:/”)
dataset <- read_delim(“dataset_example.csv”, delim = “;”, quote = “”")

But i obtain an error: R home is invalid. Why?
How can I read a csv from R into knime?

Many thanks
Giada

Hi,
if you go to your KNIME Preferences and then to KNIME -> R, can you confirm that the path set under R home exists on your PC and points to a valid R installation?
Kind regards
Alexander

Perfect, I did that.
Is it possible to read a csv from R source (table) node?

Can I put in the workspace this code:
install.packages(“tidyverse”)
library(tidyverse)
setwd(“D:/”)
dataset <- read_delim(“dataset_example.csv”, delim = “;”, quote = “”")?

thanks!

Hi,
yes, that is possible. You have to assign it to the correct variable, though. I think it is knime.out. This will then be converted to a KNIME table.
Kind regards
Alexander

Here you have examples of how to work with CSV files in R and KNIME.

2 Likes

HI there @giad,

and why not reading file with File Reader or CSV Reader node for example?

Br,
Ivan

1 Like

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