I am trying to use R Snippet to run a R code using a saved R function. However, it gives me the Error message “non-character argument”. Going through forum, I found that jemand suggested to change “data.frame” to “data.table”, this didnt solve the problem.
The R code and function with same data I used here can be running without problem in R.
I uploaded here the workflow, if you can not see the R code and data here, please tell me, I will upload these info sparately.
Hi @ShuLiu
I took a quick look but it doesn’t seem the data is included with the workflow.
If it runs fine in directly in R outside of KNIME that seems to suggest either an issue with the “new variable” path you create and pass to the source() function in R or possibly a column is being mapped to the wrong type in the table reader.
Is there anything else that would be different between the two settings?
Could you share the full error message you get? I’m assuming it’s the makePlot function throwing the error here but unsure from your description.
thank you for the answer. It seems that R and KNIME read same data, but get different results. If I let R read the data, is everything fine, once I use the KNIME input, it gave the error. I use now the R readcsv to solve this problem.
Recently I also encountered problem, that from KNIME modified .txt file can be read with KNIME with no problem, however, with R and comman line you can see KNIME CSV Writer node produced many empty wells between some lines. And this cause problem if I use R to read data. I just cannt understand.