This function generates cohort data for tree populations using the Weibull distribution based on specified tree counts, diameter at breast height (DBH) shape, and scale parameters.
Usage
rweibull_cohorts(
trees = NULL,
dbh_shape = NULL,
dbh_scale = NULL,
dbh_class_range = 1,
siteID = 1,
patchID = 1,
species = 1
)Arguments
- trees
Integer vector specifying the number of trees for each cohort. If a single integer is provided, it will be replicated for each draw.
- dbh_shape
Numeric vector specifying the shape parameters of the Weibull distribution for DBH for each cohort. If a single numeric value is provided, it will be replicated for each draw.
- dbh_scale
Numeric vector specifying the scale parameters of the Weibull distribution for DBH for each cohort. If a single numeric value is provided, it will be replicated for each draw.
- dbh_class_range
Numeric value specifying the range of DBH classes. Default is 1.
- siteID
Integer vector specifying the site ID for each cohort. If a single integer is provided, it will be replicated for each draw. Default is 1.
- patchID
Integer vector specifying the patch ID for each cohort. If a single integer is provided, it will be replicated for each draw. Default is 1.
- species
Integer vector specifying the species ID for each cohort. If a single integer is provided, it will be replicated for each draw. Default is 1.
Value
A data frame containing the cohort data with columns for site ID, patch ID, cohort ID, species, number of trees, and DBH.