powered by
Classifies the measured diameters into classes of a specified length
silv_tree_dclass( diameter, dmin = 7.5, dmax = NULL, class_length = 5, include_lowest = TRUE, return_intervals = FALSE )
A numeric vector
A numeric vector of diameters
The minimum inventory diameter in centimeters
The maximum inventory diameter in centimeters. Values that are greater than dmax are included in the greatest class
dmax
The length of the class in centimeters
Logical. If TRUE (the default), the intervals are [dim1, dim2). If FALSE, the intervals are (dim1, dim2]
[dim1, dim2)
(dim1, dim2]
[dim1, dim2). If FALSE, the intervals are (dim1, dim2]: R:dim1,%20dim2)%60.%20If%20FALSE,%20the%20intervals%20are%20%60(dim1,%20dim2
. If FALSE, the intervals are
If FALSE, it returns the intervals. Otherwise (the default), it returns the class center
library(dplyr) inventory_samples |> mutate(dclass = silv_tree_dclass(diameter))
Run the code above in your browser using DataLab