remove_incomplete_strata: Remove strata with missing values for observed steps

View source: R/random_steps.R

remove_incomplete_strataR 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_)

amt documentation built on June 25, 2024, 1:14 a.m.