R: Assert survival object

assert_surv {mlr3proba} | R 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

[Package mlr3proba version 0.4.3 Index]