Closed talgalili closed 8 years ago
The Rborist manual indicates that 'x' should be a matrix or data frame and 'y' a conforming vector, but you are right that it should not simply crash.
My proposed solution is to improve the error-handling mechanism to catch such cases.
I also suspect that using "as.matrix" will give the desired result for the rare cases someone wanted to use just one dimension x (which was my case) :)
I have fixed this particular error in a local copy and should have it on Github as soon as some other changes are folded in.
The main reason Rborist does not perform type wrangling is to minimize language-dependent behavior.
There is still the larger issue of not appropriately trapping errors thrown by Rcpp. This should have been caught and handled by the Bridge code as an Rcpp error of unknown provenance. This will go onto the TO-DO list.
Thank you for catching this one.
Thanks :)
Example: