Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sbalci/c50971bbddc0c84f9464c0f5d1cdcb40 to your computer and use it in GitHub Desktop.
Save sbalci/c50971bbddc0c84f9464c0f5d1cdcb40 to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/questions/43419385/how-to-export-survfit-output-as-a-csv-table
res <- summary(km_fit, times = c(12,36,60))
save.df <- as.data.frame(res[c("strata", "time", "n.risk", "n.event", "surv", "std.err", "lower", "upper")])
# write.csv(save.df, file = "./file.csv")
# https://git.io/fjzez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment