Produce stand age map based on cohortData

standAgeMapGenerator(
  cohortData,
  pixelGroupMap,
  weight = "biomass",
  doAssertion = getOption("LandR.assertions", FALSE)
)

Arguments

cohortData

A data.table with columns: pixelGroup, ecoregionGroup, speciesCode, and optionally age, B, mortality, aNPPAct, and sumB.

pixelGroupMap

A RasterLayer with pixel values equal to a pixel group number that corresponds exactly to pixelGroup column in cohortData.

weight

variable by which to weight cohortData ages. one of "biomass" or NA. NA means use max unweighted age.

doAssertion

A logical indicating whether some internal tests should be run to ensure the function is running correctly. Default: getOption("LandR.assertions", TRUE).

Value

raster of the same type as pixelGroupMap.