s-news
[Top] [All Lists]

Re: Editing trees

To: "adrian ming" <adrianwhm@hotmail.com>, s-news@lists.biostat.wustl.edu
Subject: Re: Editing trees
From: "Greg Snow" <Greg.Snow@intermountainmail.org>
Date: Thu, 23 Aug 2007 10:18:28 -0600
In-reply-to: <BAY103-F278CD81C27C272B96284E3ACD50@phx.gbl>
References: <BAY103-F278CD81C27C272B96284E3ACD50@phx.gbl>
Thread-index: AcfksJjGcBrTIGJIS1eCzaUkGgffsQA8CMsQ
Thread-topic: [S] Editing trees
Adrian,
 
This looks similar to a problem I had before.  In that case the problem was with the $call component of the edited tree (which is used to call the tree function for filling in the tree below your edit).  Try something like this to see if it fixes your problem (this is a work around, no guarentees):
 
> ptree8edit$call <- ptree8$call
> ptree8edit2 <- edit.tree(ptree8edit, node=29, var="empmct", splitl=102.5)
 
hope this helps,
 
(P.S. the underscore '_' has fallen out of favor, it is suggested to use <- instead)

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow@intermountainmail.org
(801) 408-8111

 


From: s-news-owner@lists.biostat.wustl.edu [mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of adrian ming
Sent: Wednesday, August 22, 2007 5:36 AM
To: s-news@lists.biostat.wustl.edu
Subject: [S] Editing trees

Hi people,
 
Could someone help me out here?
 
I edited a tree using the edit.tree function which produced the edited tree. I now want to edit this edited tree but can't seem to be able to do it in SPLUS. The command and error message are as follows:
 
The original tree: ptree8
The edited tree: ptree8edit
 
ptree8edit2 _ edit.tree(ptree8edit, node=29, var="empmct", splitl=102.5)

Problem in edit.tree: argument subset= not matched: edit.tree(object = ptree8, node = 14, var = "empmct", splitl = 65.5, subset = c("1", "2", "68", "205", "218", "447", "602", "610", "624", "663", "712", "843", "1042", "1663", "2141", "2200", "2773", "2775", "2949", "2989", "3022", "3100", "3179", "3243", "3322", "3555", "3574", "6378"))
Use traceback() to see the call stack
I think it has something to do with the way the nodes are numbered. The edited tree still uses the node numbers from the original tree and somehow SPLUS encounters a problem when editing the edited tree again.
 
Thanks for the help!
 
adrian


Fast track your education. Become TAFE qualified fast.
<Prev in Thread] Current Thread [Next in Thread>