Just as an example, for the aml data, define the Kaplan-Meier function. You may also use NA() above to get the NelsonAalen function. > fit <-survfit(Surv(aml$time, aml$status)) > KM <- approxfun(x=fit$time, y=fit$surv, method="constant", yleft = 1, rule=2, f=1) Then the function KM() can be used at any time points like KM(6.7) etc. and can also take vector input as KM( c( 4,5,6) ).