Using ten on a valid survfit object I get:
ten(survfit(Surv(y, cens)~x, data = toplotsim))
Error in if (attr(attr(data, "terms"), "response")) { :
argument is of length zero
printing the survfit object I get:
Call: survfit(formula = Surv(y, cens) ~ x, data = toplotsim)
n events median 0.95LCL 0.95UCL
x=0 376 121 93.4 83 123
x=1 269 49 NA 137 NA
Using ten on a valid survfit object I get:
printing the survfit object I get: