Hello,

I am trying to use the "tree" package in R with RSperl.

I have generated a regression tree using the "tree" package in R and saved it 
in a file say "RegTree_2.Rdata"

If I use the predict function from R command line, it works fine. However, I 
want to use it from within perl using RSperl. To do that, here is what I do,

my $regTree = "RegTree_2.Rdata";
my $tree = &R::load($regTree);
my $ans = &R::call("predict.tree", $tree, $_[0]);

On running my code, I get the following error:  
Error in predict.tree("rtree_2", list("5031601", "GS0098", 0, "1", "1",  : 
        not legitimate tree

Any help would be appreciated.

Thanks
-Rachana


    Rachana Jain
  [EMAIL PROTECTED]
  Ph: 408-499-9802 (Cell)
        513-556-7509 (Res.)
  2931 Scioto Lane Apt. No. 1002
  Cincinnati OH - 45219, U.S.A.



 __________________________________________________



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to