I want to realize function from some R package in Mathematica. First load RLink and package what I need
Needs["RLink`"]
InstallR["RHomeLocation" -> "c:\\R-2.15.3\\"]
REvaluate["library(\"randomForest\")"]
then create RObject
rf=REvaluate["randomForest(Species~ .,data=iris,importance=TRUE,proximity=TRUE)"];
create RFunction that takes an RObject as input
treeSize = RFunction["treesize"]
Here start a problem. When I call this fuction
treeSize[rf]
its return following error message
RSet::puterr: Error putting the expression ... into a variable myRandomVar123456782845 in R. The last error message issued by R was Error in attr(myRandomVar123456782845[[10]], "dimnames") <- myRandomVar123456751330: 'dimnames' must be a list