i´m looking for an solution and hope that somebody can help me.
With KNIME i´m retriving data from our system. The code knows which R-libraries are needed. In this syntax line stands the windows user as not changegable text.
Now what i want to have is, that before running the R-Source KNIME picks up the actual windows user and replace it as needed.
I got the actual User information by using the ‘Extract Context properties’. But now i´m stocking in the replacement step.
The first lines of the R Source Code are looking like this:
library(RODBC, data.table, lib.loc=“C:/Users/lozano/R/win-library/3.3”)
library(data.table, lib.loc=“C:/Users/loano/R/win-library/3.3”)
If somebody else from my team use this workflow i don´t want, that they first have to adjust the parameters for a correct data download. By using the ‘Extract Context properties’-Node it should happen automaticly.
After Extract Context Properties node use String Manipulation (Variable) node and create new flow variable(s) that you will use in your R Source node. In using String Manipulation (Variable) node there is join() function which you can use.
at first I want to thank you for you answer. But at this moment it doesn´t work in the way i want it to.
Following your suggestion i get this Error from KNIME.
ERROR R Source (Table) 0:631 Execute failed: Error in R code:
Error: :3:62: unexpected symbol
2:
3: library(RODBC, data.table, lib.loc="C:/Users/knime.flow.in[["WindowsUser
I hope that you can see in the attatched screenshot what i want to do.