I have a Kaplan Meier object from the R package survival. I can plot it and etcetera, but I would like to evaluate it at specific time points.
How can I create a function that evaluates the KM estimator at specific time points using the KM object?
library(survival)
KM <- survfit(Surv(time, status) ~ 1,data = lung)
> KM(1)
Error in KM(1) : could not find function "KM"