Error with R snippet

 

Hi,

I would like to use R snippet to calculate tthe ecdf function on a knime data column. This is my script:

R<-R

mm = ecdf(R$"size")

R<-mm

But nothing seems to be computed and I got this error message as below. Any tips ?

 Execute failed: Execution of R script failed: Calls: write.csv ... data.frame -> as.data.frame -> as.data.frame.default

This error indicates that the return type of mm is not supported by the R Snippet node. This function mm can either be used in the R View node to visualize the result or in the R Learner, the model can then be used in the R Predictor. For more details on the ecdf package please see http://stat.ethz.ch/R-manual/R-devel/library/stats/html/ecdf.html for an example:

R Learner:

R <- ecdf(rnorm(12))

R Predictor:

R <- knots(RMODEL)

if you want to calculate and see the results of ecdf function use this code

R<-as.data.frame(R$"size")
y<-rnorm(12)
mm<-ecdf(y)
R<-cbind(summary(mm))

if you want to see the function gabriel is in right use R view with

R<-as.data.frame(R$"size")
y<-rnorm(12)
mm<-ecdf(y)
R<-plot(mm)

 

hope that help you

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