defineUnitCol {GenEst} | R Documentation |
Auto-parsing to find the name of the unit column (unitCol
)
Description
If a unit column is not explicitly defined by user in the arg list to
estM
or estg
, then defineUnitCol
parses the CO, DWP,
and SS files to extract the unit column if possible.
Criteria that a column must meet to be a unit column are that it is found
in both data_CO
and data_DWP
, all units in data_CO
must
also be included among units in data_DWP
, all units in both
data_CO
and data_DWP
must be included among the column names
in data_SS
. If data_DWP = NULL
, then the unit column must be
included in data_CO
and all its units must be included among the
column names of data_SS
.
Usage
defineUnitCol(data_CO, data_SS = NULL, data_DWP = NULL)
Arguments
data_CO |
carcass observation data (data frame) |
data_SS |
search schedule data (data frame) |
data_DWP |
density-weighted proportion data (data frame) |
Value
name of unit column (unitCol
), if a unique unit column can be
identified. If no unit column is present or there is more than one unit
column, defineUnitCol
stops with an error.