Learn R Programming

qwraps2 (version 0.5.2)

qkmplot: Kaplan-Meier Plot

Description

A ggplot2 version of a Kaplan-Meier Plot

Usage

qkmplot(x, conf_int = FALSE, ...)

qkmplot_bulid_data_frame(x)

Arguments

x

object

conf_int

logical if TRUE show the CI

...

Other arguments passed to survival::plot.survfit

Value

a ggplot.

Details

Functions to build, explicitly or implicitly, data.frames and then creating a ggplot2 KM plot.

See Also

vignette("qwraps2-graphics", package = "qwraps2") for additional examples.

Examples

Run this code
# NOT RUN {
# create a survfit object
require(survival)
leukemia.surv <- survival::survfit(survival::Surv(time, status) ~ x, data = survival::aml)

qkmplot(leukemia.surv, conf_int = TRUE)

# }

Run the code above in your browser using DataLab