Closed cschaerfe closed 4 years ago
Stale issue message
Did you look at the Survminer examples?
g2 <- ggplotGrob(curv_facet) g3 <- ggplotGrob(tbl_facet) min_ncol <- min(ncol(g2), ncol(g3)) g <- gridExtra::gtable_rbind(g2[, 1:min_ncol], g3[, 1:min_ncol], size="last") g$widths <- grid::unit.pmax(g2$widths, g3$widths) grid::grid.newpage() grid::grid.draw(g)
Note that one typo was present in the original code.
When stratifying, it is sometimes useful to use ggplot's faceting (
facet_grid
andfacet_wrap
) However, this only works (if at all) only for the KM plot (e.g., when using survminer, but also visR), but it would be really useful to also have the risk table for each facet. Maybe this is something we could implement in the future?