powered by
This function generates a number at risk table that typically seen in publications.
get_nrisk_tbl(sfit, timeby)
A survival::survfit object.
The "step" in which to calculate the risk.
A data.frame with the number of risks at each timeby step.
# NOT RUN { fit <- survival::survfit(survival::Surv(time,status) ~ rx, data = survival::colon) get_nrisk_tbl(fit, timeby = 500) # }
Run the code above in your browser using DataLab