Format consecutive parcel states as transitions
Source:R/transition_functions.R
make_transitions.RdConverts a parcel-by-time state table into consecutive `from` -> `to` transitions. If a non-dominant probability column is present, transition weights are reduced when either endpoint is uncertain.
Usage
make_transitions(
year_states,
id_col = "parcel_id",
time_col = "year",
state_col = "state",
non_dom_col = "non_dom_prob",
min_weight = 0.05
)Arguments
- year_states
Data frame containing parcel states through time.
- id_col
Name of the parcel identifier column.
- time_col
Name of the integer time column.
- state_col
Name of the state column.
- non_dom_col
Name of the non-dominant probability column. If absent, all rows are treated as fully dominant.
- min_weight
Minimum transition weight.