From ripley at stats.ox.ac.uk  Fri Sep 22 18:45:30 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 22 Sep 2006 17:45:30 +0100 (BST)
Subject: [Rd] bug in function rpart (PR#9245)
In-Reply-To: <20060922144313.529874BEBB@slim.kubism.ku.dk>
References: <20060922144313.529874BEBB@slim.kubism.ku.dk>
Message-ID: <Pine.LNX.4.64.0609221743130.23969@gannet.stats.ox.ac.uk>

You have not given a reproducible example, and you are specifically asked 
not to use R-bugs for contributed packages.

Unless you are able to produce a reproducible example and send it to me as 
maintainer, there is nothing I can do, not even to know if you are using 
rpart correctly.

Please do study the FAQ and posting guide.

On Fri, 22 Sep 2006, yma at biostat.bsc.gwu.edu wrote:

> Full_Name: Yong Ma
> Version: R 2.3.1
> OS: Windows 2000
> Submission from: (NULL) (128.164.162.1)
>
>
> I have a data set containing 3000 observations. while I was trying to build a
> survival tree using the function rpart, I kept getting the following error
> message.
>> tree<-rpart(coxph(Surv(diabv, diabf) ~ weight, data = sgotdat))
> Error in "$<-.data.frame"(`*tmp*`, "yval2", value = c(1, 638)) :
>        replacement has 2 rows, data has 1
> It was confusing to me because I was able to use the coxph function on the same
> data set with no problem at all. So I googled the internet and found some help
> from the following link.
>
> http://tolstoy.newcastle.edu.au/R/devel/05/04/0598.html
>
> It suggested that the problem has to do with the length of the data. So I tried
> a subset of my original data containing 2500 observations and BINGO it worked!
>
> However, I need to run the analysis on the complete data set and the patch
> proposed by Andy is not clear to me how to implement. Please fix the bug
> systematically.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




[Rd] bug in function rpart (PR#9245)
Prof Brian Ripley