Learn R Programming

survsup (version 0.0.2)

skislopes: Convenience function for skislope color scheme

Description

Convenience function to change the color scheme to four colors: Green, blue, red, and black; i.e. as ski slopes are classified.

Usage

skislopes(g, reverse = FALSE)

Arguments

g

ggplot object containing a Kaplan-Meier plot

reverse

should the order of the colors be reversed?

Value

Returns a ggplot object

Examples

Run this code
# NOT RUN {
library(survival)
library(dplyr)
veteran %>%
    survfit(Surv(time, status) ~ celltype, data = .) %>%
   plot_survfit(cuminc = FALSE) %>%
   skislopes(reverse = TRUE)
# }

Run the code above in your browser using DataLab