View source: R/color_functions.R
skislopes | R Documentation |
Convenience function to change the color scheme to four colors: Green, blue, red, and black; i.e. as ski slopes are classified.
skislopes(g, reverse = FALSE)
g |
ggplot object containing a Kaplan-Meier plot |
reverse |
should the order of the colors be reversed? |
Returns a ggplot object
Daniel Lindholm
## Not run: library(survival) library(dplyr) veteran %>% survfit(Surv(time, status) ~ celltype, data = .) %>% plot_survfit(cuminc = FALSE) %>% skislopes(reverse = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.