View source: R/add_confidence_interval.R
add_confidence_interval | R Documentation |
Add a confidence interval represented by either a ribbon or lines.
add_confidence_interval(type = c("ribbon", "lines"), ...)
type |
string indicating the type of confidence interval to draw.
Must be one of |
... |
arguments pass to geom.
|
a ggplot2 figure
Visit the gallery for examples modifying the default figures
survfit2(Surv(time, status) ~ sex, data = df_lung) %>%
ggsurvfit() +
add_confidence_interval() +
scale_ggsurvfit()
survfit2(Surv(time, status) ~ 1, data = df_lung) %>%
ggsurvfit() +
add_confidence_interval(type = "lines") +
scale_ggsurvfit()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.