Skip to content

Subset Inventory Components of a Handler

Subsetting discards inventory components from the handler based on logical conditions. This is done in a hierarchical manner while preserving the integrity of the inventory structure. Subsetting is encouraged, as it increases the computation speed of the analysis.

Subsetting is done using the tree(), cond(), and other helpers. For example subset(tree(STATUSCD == 1)) would retain only live trees in later analysis. Subsetting is done hierarchically: subset statements for cond() apply to the conditions themselves, and trees within them, while subset statements for tree() apply only to trees. This ensures that the resulting data structure remains consistent (e.g., no trees without conditions, etc). Subsetting done higher in the hierarchy (e.g., plot()) will remove all lower-level components (e.g., conditions and trees), but retain all plots in aggregate() and estimate() calls to preserve the sanctity of the inventory design.

subset(handler, ...)
  • handler: A handler object.
  • ...: Scoped logical expressions using tree(), cond(), or plot() helpers.

The handler with pending filters queued.

# Retain only live trees
handler |> subset(tree(STATUSCD == 1))