height.of.X.tallest.trees {sitreeE} | R Documentation |
Mean height of X tallest trees
Description
It calculates the mean height of the X tallest trees by grouping variable (e.g. the plot ID)
Usage
height.of.X.tallest.trees(height, uplotID, num.trees)
Arguments
height |
A vector with heights |
uplotID |
A vector with the grouping variable, most often this would be the plot ID. |
num.trees |
Number of trees used to calculate the mean height. |
Value
It returns a data.frame with two columns containing the uplotID and the mean height of the X tallest trees.
Note
This function can be used to calculate the average of the X largest
values of any variable grouped by a grouping variable. It is mostly a
wrapper for aggregate
.
Author(s)
Clara Antón Fernández (caf@nibio.no)
See Also
Examples
library(sitree)
height.of.X.tallest.trees(height = tr$height,
uplotID = tr$plot.id, 5)
[Package sitreeE version 0.0-8 Index]