basalArea: Basal area

Description Usage Arguments Value Examples

View source: R/basalArea.R

Description

Calculates basal area of stands, either total or by species

Usage

1
basalArea(x, bySpecies = FALSE, speciesNames = FALSE, modelNames = FALSE)

Arguments

x

A data frame with tree records in rows and columns 'ID', 'Species', 'DBH' (in cm) and 'N' (ha-1)

bySpecies

A flag to indicate that basal area of the stand should be disaggregated bySpecies

speciesNames

A flag to replace species codes by names in the output

modelNames

A flag to replace species codes by species model names in the output

Value

If bySpecies = FALSE returns a vector of basal area per plot 'ID', or a single value if column 'ID' is not included in the input. If bySpecies = TRUE returns a matrix with plot 'ID' in rows and species in columns, or a numeric vector of basal area per species if 'ID' is not included in the input.

Examples

1
2
3
4
5

miquelcaceres/IFNdyn documentation built on Feb. 1, 2021, 10:55 a.m.