Export coxph summary from R to csv
问题 How to export summary of cox_proportional hazard model from R to csv. I ran a test by function coxph. by survival package Now i want to export its summary to csv, how to do that. c <- coxph(Surv(x~y)) summary(c) 回答1: From the ?coxph examples, I'll use: library(survival) test1 <- list(time=c(4,3,1,1,2,2,3), status=c(1,1,1,0,1,1,0), x=c(0,2,1,1,1,0,0), sex=c(0,0,0,0,1,1,1)) mdl <- coxph(Surv(time, status) ~ x + strata(sex), test1) mdl_summ <- summary(mdl) mdl_summ # Call: # coxph(formula = Surv