add_risktable_strata_symbol {ggsurvfit} | R Documentation |
Use Symbol for Strata in Risk Table
Description
Replace the stratum level names with a color symbol in the risk tables. Use this function when stratum level names are long.
Usage
add_risktable_strata_symbol(
symbol = NULL,
size = 15,
face = "bold",
vjust = 0.3,
...
)
Arguments
symbol |
UTF-8 code of shape to
replace strata level with. Default is a rectangle ( |
size , face , vjust , ... |
arguments passed to a function similar to
|
Value
a ggplot2 figure
See Also
Visit the gallery for examples modifying the default figures
Examples
p <-
survfit2(Surv(time, status) ~ sex, data = df_lung) %>%
ggsurvfit(linewidth = 1) +
add_confidence_interval() +
add_risktable(risktable_group = "risktable_stats") +
scale_ggsurvfit()
p + add_risktable_strata_symbol()
p + add_risktable_strata_symbol(symbol = "\U25CF", size = 10)
[Package ggsurvfit version 1.1.0 Index]