set.seed(123)
n <- 150
c130 <- runif(n, 30, 230)
htot <- 0.25 * c130 + rnorm(n, 0, 3)
htot <- pmax(5, pmin(htot, 45))
species_list <- c(
"PINUS_SYLVESTRIS", "PICEA_ABIES",
"QUERCUS_ROBUR", "FAGUS_SYLVATICA", "BETULA_SP"
)
species_code <- sample(species_list, n, replace = TRUE)
df <- data.frame(
c130 = round(c130, 1),
htot = round(htot, 1),
species_code = species_code
)
df <- dagnelie_vc22_2(df)
res <- plot_by_class(df, volume_col = "dagnelie_vc22_2")
res$table
print(res$plot)
Run the code above in your browser using DataLab