Learn R Programming

sitreeE (version 0.0-10)

lorey.height: Lorey's height

Description

Calculates Lorey's height (mean height weigted by basal area). If group.id is not NULL, it will calculate Lorey's height for each group.

Usage

lorey.height(BA, height, group.id = NULL)

Value

If a grouping variable is provided it returns a data frame with two columns (group.id, and lorey.height). If a grouping variable is not provided it will return the Lorey's height.

Arguments

BA

A vector with the basal areas of the trees

height

A vector with the height of the trees

group.id

An optional vector with a grouping variable.

Author

Clara Anton Fernandez (caf@nibio.no)

See Also

height.of.X.tallest.trees

Examples

Run this code
library(sitree)
BA <- pi*(tr$dbh/2)^2
lorey.height(BA, tr$height)
lorey.height(BA, tr$height, tr$plot.id)

Run the code above in your browser using DataLab