powered by
Surv
Plot a Surv object.
# S3 method for Surv plot(x, l = 3, ...)
A Surv object
length of arrow. Length is l / nrow(x)
l / nrow(x)
Additional arguments. These are passed to as ... (an ellipsis) to the following functions, respectively:
...
graphics::arrows
for plotting right- or left-censored observations
graphics::segments
for plotting interval-censored observations
A graph (base graphics). The type of graph depends on the type of the Surv object. This is given by attr(s, which="type") :
type
attr(s, which="type")
Lines with an arrow pointing right if right censored.
Lines with an arrow pointing left if left censored.
If censored:
right censored
left censored
observations of more than one time point
observation of one time only (i.e. start and end times are the same)
?graphics::arrows
?graphics::segments
# NOT RUN { df0 <- data.frame(t1=c(0, 2, 4, 6, NA, NA, 12, 14), t2=c(NA, NA, 4, 6, 8, 10, 16, 18)) s5 <- Surv(df0$t1, df0$t2, type="interval2") plot(s5) # }
Run the code above in your browser using DataLab