[R] randomForest Error passing string argument

mmv melanie.vida at gmail.com
Mon Aug 15 21:47:34 CEST 2005


I'm attempting to pass a string argument into the function
randomForest but I get an error:

state <- paste(list("fruit ~", "apples+oranges+blueberries",
"data=fruits.data, mtry=2, do.trace=100, na.action=na.omit,
keep.forest=TRUE"), sep= " ", collapse="")

model.rf <- randomForest(state)

Error in if (n==0) stop ("data(x) has 0 rows") argument is of length zero.

-Thanks in advance,




More information about the R-help mailing list