Surv: Survival Objects

View source: R/Surv.R

SurvR Documentation

Survival Objects

Description

Wrapper for survival::Surv.

Usage

Surv(
  time,
  time2,
  event,
  type = c("right", "left", "interval", "counting", "interval2", "mstate"),
  origin = 0
)

Arguments

time

see survival::Surv

time2

see survival::Surv

event

see survival::Surv

type

see survival::Surv

origin

see survival::Surv

Value

See ⁠[survival::Surv]⁠.

Surv in survival vs. in popEpi

popEpi::Surv is a wrapper for survival::Surv. Therefore you don't need to to do library("survival") when using Surv with e.g. ⁠[survtab]⁠. Remember that if you do library("survival") after library("popEpi"), the Surv from survival is used instead of from popEpi (R throws a warning about this) when an expression such as Surv(my_times, my_events) is evaluated. You can avoid such conflicts by writing e.g. popEpi::Surv(my_times, my_events) instead. However, popEpi::Surv is designed in such a way that this should not become a problem and you should be able to use the two interchangeably.

See Also

Other main functions: rate(), relpois(), relpois_ag(), sir(), sirspline(), survmean(), survtab(), survtab_ag()

Other survtab functions: lines.survtab(), plot.survtab(), print.survtab(), summary.survtab(), survtab(), survtab_ag()

Other survmean functions: lines.survmean(), plot.survmean(), survmean()


popEpi documentation built on April 4, 2025, 2:51 a.m.