[R] str and Surv objects

Liaw, Andy andy_liaw at merck.com
Wed Aug 11 04:19:23 CEST 2004


Buried in str.default is a line:

    iv.len <- round(2.5 * v.len)

which seems to be the culprit.  v.len is 4, which seems correct for the data
given.  Why multiply by 2.5?

Andy

> From: Laura Holt
> 
> Dear R People:
> 
> I used the "Surv" function to produce the following object:
> >a <- Surv(1:4,2:5,c(0,1,1,0)) a
> [1] (1,2+] (2,3 ] (3,4 ] (4,5+]
> >str(a)
> Error in "[.Surv"(object, 1:ile) : subscript out of bounds
> >
> 
> Why does str(a) give an error, please?  Or did I do something wrong?
> 
> Thanks in advance.
> R Version 1.9.1 Windows
> Sincerely,
> Laura Holt
> mailto: lauraholt_983 at hotmail.com
> 
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list