kmplot_ticks | R Documentation |
kmplot
Add tick marks to a kmplot
representing a specific event,
what
, occurring within a variable, by_var
.
kmplot_ticks(
object,
data = eval(object$call$data),
by_var,
what,
y = 0,
time,
event,
strata,
col = NULL,
pch = NULL,
...
)
object |
an object of class |
data |
the data set used to fit |
by_var , what |
a variable, |
y |
the y-coordinate(s) for each point, recycled as needed |
time , event , strata |
(optional) variables used to fit |
col |
a vector of colors (one for each strata level of |
pch |
a vector of plotting characters to distinguish censoring and events |
... |
additional arguments passed to |
kmplot
; kmplot_by
library('survival')
s <- survfit(Surv(futime, fustat) ~ rx, ovarian)
kmplot(s, add = TRUE)
kmplot_ticks(s, by_var = 'resid.ds', what = 1)
kmplot_ticks(s, by_var = 'resid.ds', what = 2, pch = '*', y = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.