GenEst (version 1.2.0)

DWPbyCarcass: Assign DWP value to each carcass

Description

Expand the density weighted proportion table to a value for each carcass (across multiple classes if desired) based on the unit where they were found

Usage

DWPbyCarcass(data_DWP, data_CO, unitCol = NULL, sizeCol = NULL,
  DWPCol = NULL)

Arguments

data_DWP

Survey unit (rows) by size (columns) density weighted proportion table

data_CO

Carcass observation data

unitCol

Column name for the unit indicator (optional). If NULL, then is assumed to be the column that data_DWP and data_CO share. If none are in common, error is thrown with no remedy. If data sets share more than one column, user is asked to input unitCol.

sizeCol

Name of colum in data_CO where the size classes are recorded. Optional.

DWPCol

Name of column where DWP values are stored (optional). Used when there is more than one DWP column in data_DWP but analysis is intended for a single class (i.e., no "size" is specified in data_CO). If sizeCol is NULL and DWPCol is not provided, there is a check for possible DWPCols. If there is only one column with values in (0, 1], that's DWPCol. If there is not a unique column with values in (0, 1], an error is returned.

Value

DWP value for each carcass

Examples

Run this code
# NOT RUN {
 data(mock)
 DWP <- DWPbyCarcass(data_DWP = mock$DWP, data_CO = mock$CO,
          sizeCol = "Size", unitCol = "Unit")
 DWP <- DWPbyCarcass(data_DWP = mock$DWP, data_CO = mock$CO,
          unitCol = "Unit", DWPCol = "S")

# }

Run the code above in your browser using DataLab