
Convert between dynamic mask index and static location index
Source:R/dmi_to_i.R
dynamic_mask_index_conversions.Rd
dmi_to_i()
and i_to_dmi()
are for internal and advanced use;
they are not likely to be helpful to most users.
See index conversions for, likely, more useful conversions.
These two functions convert between indices along the cells that are
included in the dynamic mask (dmi
) and standard location
indices (i
) along the cells that are included by the static mask.
This conversion requires knowing the timestep
associated with each dmi
or i
value
as the mapping between the two is different for each timestep.
Arguments
- dmi
Dynamic mask index values. These will always be integers between
1
and the sum of the dynamic mask for the given timestep.- timestep
Either a single timestep to be used for all conversions or a vector of the timesteps associated with each input value:
dmi
fordmi_to_i()
ori
fori_to_dmi()
.- bf
A BirdFlowR model. Note the conversion is specific to this model and not valid for any others.
- i
Location index. This indicates a location based on an index of the cells included by the static mask. These start in the top left location and fill in by row.