Skip to content

Commit

Permalink
Simplify df column aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo authored and davidsantiagoquevedo committed Jul 22, 2024
1 parent 7710710 commit 4eb34e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/coh_eff_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extract_surv_model <- function(model, start_cohort, end_cohort) {
tte <- seq(0, as.numeric(days) - 1, by = 1)
res <- summary(model, times = tte, scale = 1)
cols <- lapply(c(2:6, 8:16), function(x) res[x])
tbl <- do.call(data.frame, cols)
tbl <- data.frame(cols)
tbl$date <- tbl$time + start_cohort
return(tbl)
}
Expand Down

0 comments on commit 4eb34e1

Please sign in to comment.