From c308c5e2b016c03c7a6ce7475d8ec9ea8f913209 Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 16 May 2024 19:35:45 -0400 Subject: [PATCH] Fix checks --- R/ard_survival_survfit.R | 4 +++- man/dot-process_survfit_time.Rd | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/R/ard_survival_survfit.R b/R/ard_survival_survfit.R index 2a06a2b97..cde822bf7 100644 --- a/R/ard_survival_survfit.R +++ b/R/ard_survival_survfit.R @@ -111,6 +111,8 @@ ard_survival_survfit <- function(x, times = NULL, probs = NULL, type = NULL) { #' #' @inheritParams cards::tidy_as_ard #' @inheritParams ard_survival_survfit +#' @param start.time (`numeric`)\cr +#' default starting time. See [survival::survfit0()] for more details. #' #' @return a `tibble` #' @@ -151,7 +153,7 @@ ard_survival_survfit <- function(x, times = NULL, probs = NULL, type = NULL) { # tidy survfit results x_cols <- intersect(names(x), c("time", "n.risk", "surv", "std.err", "upper", "lower", "strata")) tidy_x <- data.frame(x[x_cols]) %>% - dplyr::rename(estimate = surv, std.error = std.err, conf.high = upper, conf.low = lower) + dplyr::rename(estimate = "surv", std.error = "std.err", conf.high = "upper", conf.low = "lower") strat <- "strata" %in% names(tidy_x) diff --git a/man/dot-process_survfit_time.Rd b/man/dot-process_survfit_time.Rd index c6f9bee25..cc3b6682c 100644 --- a/man/dot-process_survfit_time.Rd +++ b/man/dot-process_survfit_time.Rd @@ -4,7 +4,7 @@ \alias{.process_survfit_time} \title{Process Survival Fit For Time Estimates} \usage{ -.process_survfit_time(x, times, type) +.process_survfit_time(x, times, type, start.time = NULL) } \arguments{ \item{x}{(\code{\link[survival:survfit]{survival::survfit()}})\cr @@ -22,6 +22,9 @@ Must be one of the following:\tabular{ll}{ \code{"risk"} \tab \code{1 - x} \cr \code{"cumhaz"} \tab \code{-log(x)} \cr }} + +\item{start.time}{(\code{numeric})\cr +default starting time. See \code{\link[survival:survfit0]{survival::survfit0()}} for more details.} } \value{ a \code{tibble}