pfExpand: Convert to forest level a variable measured or estimated, at...

Description Usage Arguments Value Note Author(s) See Also Examples

Description

The function guesses the unit of measure of plot size (ha or m^2) if parameter unit is set to auto:

Usage

1
  pfExpand(variable, plotSize, unit = "auto")

Arguments

variable

the variable measured or estimated in the traditional plot

plotSize

the plot size

unit

a character value to indicate the unit of measure of plotSize: ha, m2, auto (default value)

Value

a single or vector of numeric values, not rounded

Note

The function is vectorized both for variable and for plotSize. Be careful of the recycling rule, see example section.

Author(s)

Marco Bascietto marco.bascietto@ibaf.cnr.it

See Also

Other structuralAnalysis: rfBasalArea, rfTreeDensity, tpBasalArea, ttBasalArea, ttMeanDbh

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# dbh from an ideal even-aged plot, in cm
dbhList <- runif(10, min = 30, max = 40)
# Tree density, plot size in m^2
pfExpand(length(dbhList), 500)
# Tree density, plot size in ha
pfExpand(length(dbhList), 0.05)
# Basal area at forest level
pfExpand(tpBasalArea(dbhList), 0.05)
# Vector of tree counts for 10 plots
treeCountList <- sample(30:60, size = 10, replace = TRUE)
# Tree density, plot size is 0.05 ha
pfExpand(treeCountList, 0.05)
# Tree density, first plot size is 0.05 ha, all other plots 0.04 ha
pfExpand(treeCountList, c(0.05, 0.04:9))
# Tree density, first plot size is 0.05 ha, all other plots 0.04 ha,
# wrong call, c(0.05, 0.04) is recycled 5 times
pfExpand(treeCountList, c(0.05, 0.04))
# Tree density, first plot size is 500 m^2, all other plots 0.04 ha,
# be aware that the unit of measure of all plots size is assumed to be m^2 because one plot size is given as m^2
pfExpand(treeCountList, c(500, 0.04:9))

mbask/forestry documentation built on May 21, 2019, 2:25 p.m.