From edd7a5fca935517e3297d9004c1c1b0e94ee673f Mon Sep 17 00:00:00 2001 From: Heidi Seibold Date: Wed, 22 Aug 2018 11:52:49 +0200 Subject: [PATCH 1/2] change ggcoxadjustedcurves -> ggadjustedcurves --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6775123..0e3aa8a 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ The main functions, in the package, are organized in different categories as fol - **ggforest**(): Draws forest plot for CoxPH model. -- **ggcoxadjustedcurves**(): Plots adjusted survival curves for coxph model. +- **ggadjustedcurves**(): Plots adjusted survival curves for coxph model.
From 7cb6cc8869796d5797a07ada0a6f4d15f039fa65 Mon Sep 17 00:00:00 2001 From: Heidi Seibold Date: Wed, 22 Aug 2018 12:00:10 +0200 Subject: [PATCH 2/2] allow for survfit(..., conf.type = 'none') in surv_summary --- R/surv_summary.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/surv_summary.R b/R/surv_summary.R index 0316f98..1b5a4ef 100644 --- a/R/surv_summary.R +++ b/R/surv_summary.R @@ -58,8 +58,10 @@ surv_summary <- function (x, data = NULL){ ncurve <- ncol(x$surv) res <- data.frame(time = rep(x$time, ncurve), n.risk = rep(x$n.risk, ncurve), n.event = rep(x$n.event, ncurve), n.censor = rep(x$n.censor, ncurve)) - res <- cbind(res, surv = .flat(x$surv), std.err = .flat(x$std.err), - upper = .flat(x$upper), lower = .flat(x$lower)) + res <- cbind(res, surv = .flat(x$surv), + std.err = ifelse(is.null(x$std.err), NA, .flat(x$std.err)), + upper = ifelse(is.null(x$upper), NA, .flat(x$upper)), + lower = ifelse(is.null(x$lower), NA, .flat(x$lower))) res$strata <- as.factor(rep(colnames(x$surv), each = nrow(x$surv))) } # case of standard survfit() or survfit(res.cox)