groupDBH: Group DBH values into Classes.

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

Description

This is used in conjunction with dbhClassLimits to simply group the raw diameters into class midpoints.

Usage

1
groupDBH(dbh, classLimits)

Arguments

dbh

a vector of diameter values to be classed.

classLimits

A data frame with lower, mid and upper class limits from dbhClassLimits.

Details

This just computes the diameter classes based on the midpoints of the class for all dbh values passed. If any diameters lie outside the chosen limits, they are marked as NA and a warning is issued.

Value

A list with...

dbh.grp

A vector with midpoint diameter classes.

idx

A vector of the integer index values of each diameter in the class limits data frame.

Author(s)

JHG.

See Also

dbhClassLimits, or for a complete stand table along the lines of the example below, standTable.

Examples

1
2
3
4
5
6
7
lims = dbhClassLimits()
dbh = rexp(40, .25)      #some diameters
gd = groupDBH(dbh, lims)
rbind(gd$dbh.grp, dbh)
table(gd$dbh.grp)
dbhcl = factor(groupDBH(dbh, lims)$dbh.grp, levels=lims[,2])
as.data.frame(table(dbhcl))

Mensuration documentation built on May 2, 2019, 4:52 p.m.