dtime <- c(1, 3, 7); death <- c(1, 0, 1)
units(dtime) <- 'Month'
label(dtime) <- 'Event/censoring time'
label(death) <- 'Death, all causes'
S <- Srv(dtime, death)
attributes(S)
S[2:3,]
attributes(S[2:3,])
Run the code above in your browser using DataLab