Adds a column giving each row's reporting group, looked up from the code it is simulated as.

landweb_add_report_column(
  sppEquiv,
  col = "LandWeb",
  reportCol = "LandWebReport"
)

Arguments

sppEquiv

data.table species equivalency table with column col, e.g. from landweb_sppEquiv(). It is not modified.

col

character; the column holding the simulated codes.

reportCol

character; the name of the new column.

Value

A copy of sppEquiv with column reportCol. It is an error for a row's simulated code to have no reporting group, or for reportCol to exist already.