s-news
[Top] [All Lists]

Re: tree function in R language

To: "'chushu Gu'" <chushugu@hotmail.com>, s-news@lists.biostat.wustl.edu
Subject: Re: tree function in R language
From: "Liaw, Andy" <andy_liaw@merck.com>
Date: Tue, 27 Jul 2004 23:22:06 -0400
Have you read the (latest edition of the) book for which the package you are
using supports?  There are differences in S-PLUS and R (and the 4th edition
of MASS supports both, thus ought to tell you this particular difference
between the two).  tree() in S-PLUS is written originally by Clark and
Pregibon.  If you want that functionality in R, you need to load the `tree'
package (available on CRAN), which is an independent implementation by one
of the co-authors of MASS.

Another hint: Look in the `scripts' subdirectory of where the `MASS' package
is installed.

Andy

> From: chushu Gu
> 
> Hi all,
> 
> I am using R 1.8.1, I have the following code,
> 
> library(MASS)
> data(iris)
> ir.tr <- tree(Species ~., iris)
> ir.tr
> summary(ir.tr)
> 
> 
> I got the following message:
> 
> Error: couldn't find function "tree"
> 
> I don't the reason, as I already load the library "MASS".
> 
> Could anyone tell me the possible reasons?
> 
> Thanks,
> 
> Chushu Gu
> 
> _________________________________________________________________
> Share a single photo or an entire photo slide show right inside MSN(r) 
> Messenger. 
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&;
> DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
>   Start enjoying all the benefits of MSN(r) Premium right now 
> and get the 
> first two months FREE*.
> 
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
> 
> 


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
------------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>