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

View source: R/HeightofXtallesttrees.R

It calculates the mean height of the X tallest trees by grouping variable (e.g. the plot ID)

1 | ```
height.of.X.tallest.trees(height, uplotID, num.trees)
``` |

`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. |

It returns a data.frame with two columns containing the uplotID and the mean height of the X tallest trees.

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`

.

Clara Antón Fernández (caf@nibio.no)

1 2 3 4 | ```
library(sitree)
height.of.X.tallest.trees(height = tr$height,
uplotID = tr$plot.id, 5)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.