predict_allo {allometric}R Documentation

Predict allometric attributes using a column of allometric models

Description

A frequent pattern in forest inventory anaylsis is the need to produce predictions of models with the same functional form, but using different models. predict_allo enables this by allowing the user to pass a list-column of models as an argument, along with the associated covariates. This pattern plays well with dplyr functions such as dplyr::mutate().

Usage

predict_allo(model_list, ...)

Arguments

model_list

A list-column of models

...

Additional arguments passed to each model's predict_fn

Value

A vector of predictions

Examples

tree_data <- tibble::tibble(
 dbh = c(10, 20), ht = c(50, 75), model = c(list(brackett_rubra), list(brackett_acer))
)

tree_data %>%
  dplyr::mutate(vol = predict_allo(model, dbh, ht))

[Package allometric version 2.1.0 Index]