View source: R/sequence_terminal.R
| actor_endpoints | R Documentation |
For each actor (row), reports the first and last observed states,
the time indices at which they appear, the number of observed
steps, and a dropped_out flag that is TRUE when the actor
has a terminal-NA pattern (after the final observed step,
every remaining cell is NA).
actor_endpoints(data, cols = NULL)
data |
A wide-format matrix or data.frame where rows are
actors and columns are time steps. Cells are state labels;
|
cols |
Optional character vector of state-column names. If
|
A tidy data.frame with one row per actor and columns:
actorRow number (or row name if present).
first_stateFirst non-NA state.
last_stateLast non-NA state.
first_stepColumn index of the first observed state.
last_stepColumn index of the last observed state.
n_observedNumber of non-NA cells.
dropped_outTRUE iff every cell after last_step
is NA and last_step < ncol(data).
mark_terminal_state(), chain_structure()
actor_endpoints(trajectories) |> head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.