predict_allo | R Documentation |
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()
.
predict_allo(model_list, ...)
model_list |
A list-column of models |
... |
Additional arguments passed to each model's |
A vector of predictions
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.