This function is a simplification of vegTypeMapGenerator and instead of generating a map, it adds the vegetation type column to the cohortData table.

vegTypeGenerator(
x,
mixedType = 2,
sppEquiv = NULL,
sppEquivCol,
pixelGroupColName = "pixelGroup",
doAssertion = getOption("LandR.assertions", TRUE),
...
)

Arguments

x A cohortData object Numeric between 0-1, determining the relative biomass threshold a species needs to pass to be considered "leading". An integer defining whether mixed stands are of any kind of species admixture (1), or only when deciduous mixed with conifer (2). Defaults to 2. table with species name equivalencies between the kNN and final naming formats. See data("sppEquivalencies_CA", "LandR"). Only necessary if mixedType == 2. If not provided and mixedType == 2, will attempt to use data("sppEquivalencies_CA", "LandR"). the column name to use from sppEquiv. Only necessary if mixedType == 2. If not provided and mixedType == 2, will attempt to use "Boreal". Name of the column in pixelGroup to use. A logical indicating whether some internal tests should be run to ensure the function is running correctly. Default: getOption("LandR.assertions", TRUE). Additional arguments.

Value

x with a new column, 'leading', coding the vegetation type of each group defined by pixelGroupColName