I'm trying to use the “R View (Table)” node in order to generate a X-Y scatter plot including the best fit line over the points. My scatterplot represent the response variable in the X axis and the prediction of the response on the Y axis.
As the response and the prediction response can vary from time to time, I'm trying to pass them in the R plot through the flow variables in this way:
Unfortunately this does not seem the right approach as I obtain the following error:
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
x and y are nominal variables (strings) which need to be used to access the columns with the name given by the parameter x and y within the dataframe knime.in, that means, your script would read as plot(knime.in[,x], knime.in[,y]); Hope this helps.
Your suggestion allowed me to achieve a generalized R scatterplot including the best line fit and the R2 value as legend. The only input of the R (view) table node is a table containing the independent variable (which flow var name is "response_name" and the dependent variable "prediction_response_name".
I write here the code for if somebody can be interested.
Your suggestion allowed me to achieve a generalized R scatterplot including the best line fit and the R2 value as legend. The only input of the R (view) table node is a table containing the independent variable (which flow var name is "response_name" and the dependent variable "prediction_response_name".
I write here the code for if somebody can be interested.