silv_diametric_class {silviculture} | R Documentation |
Classify diameters in classes
Description
Classifies the measured diameters into classes of a specified length
Usage
silv_diametric_class(
diameter,
dmin = 7.5,
dmax = NULL,
class_length = 5,
include_lowest = TRUE,
return_intervals = FALSE
)
Arguments
diameter |
A numeric vector of diameters |
dmin |
The minimum inventory diameter in centimeters |
dmax |
The maximum inventory diameter in centimeters. Values that
are greater than |
class_length |
The length of the class in centimeters |
include_lowest |
Logical. If TRUE (the default), the intervals are
[dim1, dim2) |
return_intervals |
If FALSE, it returns the intervals. Otherwise (the default), it returns the class center |
Value
A numeric vector
Examples
library(dplyr)
inventory_samples |>
mutate(dclass = silv_diametric_class(diameter))
[Package silviculture version 0.1.0 Index]