RcmdrPlugin.KMggplot2 depends survfit function of survival package. Dataset requirements are same as survfit function, which works with Surv objects.

Surv object

Surv objects are generated from Surv function. RcmdrPlugin.KMggplot2 calls as follows:

survfit(Surv(time = x, event = y, type = "right") ~ z + s + t, .df)

Arguments

RcmdrPlugin.KMggplot2 requires a data frame that at least includes time and event variables, and includes z, s, t if you needs

Data Example

data(dataKm, package = "RcmdrPlugin.KMggplot2")
exampleData <- dataKm[, c("time", "event", "trt", "sex", "marker")]
knitr::kable(head(exampleData, 10))

In this case:



triadsou/RcmdrPlugin.KMggplot2 documentation built on May 31, 2019, 7:52 p.m.