ggkmcif_paste {reportRmd} | R Documentation |
Plot KM and CIF curves with ggplot
Description
This function puts together a survival curve, and a number at risk table
Usage
ggkmcif_paste(list_gg)
Arguments
list_gg |
list containing the results of ggkmcif |
Value
a gtable with three elements, the survival curve, a spacer and the number at risk table
Examples
data("pembrolizumab")
plot <- ggkmcif(response=c('pfs_time','pfs_status'),
data=pembrolizumab,returns = TRUE)
# Highlighting a section of the curve
plot[[1]] <- plot[[1]] +
ggplot2::geom_rect(xmin=4,xmax=8,ymin=0.15,ymax=0.4,alpha=0.01,fill='yellow')
# Putting the curve back together
ggkmcif_paste(plot)
[Package reportRmd version 0.1.0 Index]