This will expand a sppEquiv object that is only a vector or only a one-column data.table into a many column data.table, if the columns that are present do not contain ensureColumns.

sppEquivCheck(sppEquiv, ensureColumns = NULL, sppEquivCol = NULL)

Arguments

sppEquiv

A character vector or data.table with named column(s). If this data.table does not have columns named ensureColumns, then it will attempt to merge this data.table with sppEquivalencies_CA to get ensureColumns.

ensureColumns

A character vector of column names that must be in sppEquiv. If these are not present, then the function will attempt to merge with sppEquivalencies_CA, so the column name(s) of sppEquiv must match column names in sppEquivalencies_CA.

sppEquivCol

Optional. Column in sppEquivalencies_CA to use for equivalent names when sppEquiv not provided (i.e., when sppEquivalencies_CA is used instead).

Value

A data.table with potentially all columns in sppEquivalencies_CA.