More difficult than it should be IMO.
survminer package is often helpful. But if you want to avoid dependency:
library(survival)
fit <- survfit( Surv(time,status)~sex,data=lung)
surfable <-summary(fit)$table
surfable
# just the events
surfable[,"events"]
On Wed, 15 May 2024, 21:42 Dennis Fishe
OS X
R 4.3.3
Colleagues
I have created objects using the Surv function in the survival package:
> FIT.1
Call: survfit(formula = FORMULA1)
n events median 0.95LCL 0.95UCL
SUBDATA$ARM=1, SUBDATA[, EXP.STRAT]=0 18 13345 156 NA
SUBDATA$ARM=2, S
Dear all,
I am using R 4.4.0 via RStudio (2024.04.0) on a Windows PC. The code below
worked on the previous version of the flexsurv but is not working since my
recent update (version 2.3).
The code that was working is:
library(survival)
rfs <- pmax(rotterdam$recur, rotterdam$death)
rfstime
3 matches
Mail list logo