remove_incomplete_strata | R Documentation |
Remove strata with missing values for observed steps
remove_incomplete_strata(x, ...)
## S3 method for class 'random_steps'
remove_incomplete_strata(x, col = "ta_", ...)
x |
An object of class |
... |
Further arguments, none implemented. |
col |
A character with the column name that will be scanned for missing values. |
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).
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_)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.