Merges multiple pre-defined sampling strata into a single stratum.
Usage
merge_strata(data, strata, merge, name = NULL)
Value
Returns the input dataframe with a new column named
'new_strata' that holds the name of the stratum that each sample
belongs to after the merge. The column containing the previous
strata names is retained and given the name 'old_strata'.
Arguments
data
a dataframe or matrix with one row for each sampling
unit, one column, strata,
specifying each unit's current stratum, and any
other relevant columns.
strata
a character string specifying the name of the
column that defines each unit's current strata.
merge
the names of the strata to be merged, exactly as
they appear in strata.
name
a character name for the new stratum. Defaults to
NULL, which pastes the old strata names together to create the
new stratum name.