Using R in RapidMiner
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?
Best Answer
-
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.
0
Answers
-
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.
0