therneau / survival

Survival package for R
381 stars 104 forks source link

Example for length of object doesn't execute #256

Closed david-cortes closed 3 months ago

david-cortes commented 3 months ago

In the documentation for methods: https://github.com/therneau/survival/blob/3877f05c13f7f9fcedd19b5a21825787ac9b3ad3/man/Survmethods.Rd#L93

The following example is given:

x <- Surv(1:4, 5:9, c(1,0,1,0)); length(x)

And mentions:

has a value of 4.

But the example doesn't run, since 1:4 and 5:9 have different lengths.

therneau commented 3 months ago

Good catch, I will fix.