assert_surv: Assert survival object

View source: R/assertions.R

assert_survR Documentation

Assert survival object

Description

Asserts x is a survival::Surv object with added checks

Usage

assert_surv(
  x,
  len = NULL,
  any.missing = TRUE,
  null.ok = FALSE,
  .var.name = vname(x)
)

Arguments

x

Object to check

len

If non-NULL checks object is length len

any.missing

If FALSE then errors if there are any NAs in x

null.ok

If FALSE then errors if x is NULL, otherwise passes

.var.name

Optional variable name to return if assertion fails


mlr3proba documentation built on April 25, 2022, 5:07 p.m.