[R] str and Surv objects
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?
> 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,2+] (2,3 ] (3,4 ] (4,5+]
> 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
> Laura Holt
> mailto: lauraholt_983 at hotmail.com
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help