addNoPixel2CohortData: Add number of pixels per 'pixelGroup' and add it has a new...

addNoPixel2CohortDataR Documentation

Add number of pixels per pixelGroup and add it has a new column to cohortData

Description

Add number of pixels per pixelGroup and add it has a new column to cohortData

Usage

addNoPixel2CohortData(
  cohortData,
  pixelGroupMap,
  cohortDefinitionCols = c("pixelGroup", "age", "speciesCode"),
  doAssertion = getOption("LandR.assertions", TRUE)
)

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.

cohortDefinitionCols

the columns in cohortData that define unique cohorts

doAssertion

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

Value

An cohortData dat.table with a new noPixels column


PredictiveEcology/LandR documentation built on June 7, 2024, 4:16 p.m.