Options

Using R in RapidMiner

z384zhanz384zhan Member Posts: 4 Contributor I
edited November 2018 in Help

I installed the Execute R script operator in RapidMIner. Everything works fine but I found the following code didn't work:

rm_main = function(dataset)
{
new_dataset = dataset[1,c(1,5)]
return new_dataset
}

Basically all the operations using "[]"  doesn't work properly. I understand this can be done by Select Attributes in RapidMIner, but is it my problem or such R syntax is not supported in RapidMIner?

Tagged:

Best Answer

  • Options
    z384zhanz384zhan Member Posts: 4 Contributor I
    Solution Accepted

    Never mind. I passed a R data table instead of a data frame into the function. Although in R you can treat table as data frame but here you have to change it to an actual "data frame" using as.data.frame.matrix(dataset). Hope this is helpful to you guys.

Sign In or Register to comment.