[R] Error in tree package

White.Denis@epamail.epa.gov White.Denis at epamail.epa.gov
Mon Jul 8 19:02:10 CEST 2002


>     Hi.
>     I'm using the tree package to fit one tree from a training set.
>     I'm using the command:
>         hm.tr <-tree(X1~.,teste2, mindev = 0, minsize = 2)
>
>     and i get the error:
>
>     Error in "row.names<-.data.frame"(*tmp*, value = fit$node[1:n]) :
>             duplicate row.names are not allowed
>
>     the frameset, has 180 columns and 16000 rows.
>     The first column, takes a value from 42..61 and the others 0 or 1.
>
>     Any help will be apreciated.
>
>     Thanks
>
>     Hugo
>
>     P.s. I'm using R1.3.0 in a winnt machine

I don't know if anyone has replied to you yet.  Your problems appear to
be more elementary than using the tree package.  I think you may need to
understand better the concept of data frames in R (the "row names" need
to be unique, for example, and, although I can't find this stated
explicitly in the documentation, it is certainly enforced).

Nevertheless, before trying to use the tree package again, I suggest you
upgrade R to the latest version (1.5.1) and switch from the tree package
to the rpart package.  The rpart package has better diagnostic
facilities and is being more actively maintained.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list