View source: R/color_functions.R
cat4 | R Documentation |
Convenience function to change the color scheme to four colors: Green, blue, red, and yellow; i.e. like the ski slopes but with yellow instead of black.
cat4(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
library(survival) library(dplyr) veteran %>% survfit(Surv(time, status) ~ celltype, data = .) %>% plot_survfit(cuminc = FALSE) %>% cat4(reverse = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.