remove_incomplete_strata {amt}R Documentation

Remove strata with missing values for observed steps

Description

Remove strata with missing values for observed steps

Usage

remove_incomplete_strata(x, ...)

## S3 method for class 'random_steps'
remove_incomplete_strata(x, col = "ta_", ...)

Arguments

x

An object of class random_steps.

...

Further arguments, none implemented.

col

A character with the column name that will be scanned for missing values.

Value

An object of class random_steps, where observed steps (case_ == TRUE) with missing values (NA) in the column col are removed (including all random steps).

Examples


mini_deer <- deer[1:4, ]

# The first step is removed, because we have `NA` turn angles.
mini_deer |> steps() |> random_steps() |> remove_incomplete_strata() |>
  select(case_, ta_, step_id_)

[Package amt version 0.2.2.0 Index]