This function "widens" focal-competitor data frames for use inside of
package modeling functions, where each comp_sp
inside of the comp
list-column receives its own column with its associated total basal area.
This function is used internally by comp_bayes_lm()
and
predict.comp_bayes_lm()
exported as a convenience for
applications extending this package's functionality.
create_bayes_lm_data(focal_vs_comp, run_shuffle = FALSE)
focal_vs_comp | data frame from |
---|---|
run_shuffle | boolean as to whether to run permutation test shuffle of competitor tree species within a particular focal_ID |
Data frame for internal package use.
Other modeling functions:
comp_bayes_lm()
,
predict.comp_bayes_lm()
,
run_cv()
Other data processing functions:
compute_growth()
,
create_focal_vs_comp()
create_bayes_lm_data(focal_vs_comp_ex)#> # A tibble: 6 × 6 #> focal_ID sp dbh growth american_beech sugar_maple #> <dbl> <fct> <dbl> <dbl> <dbl> <dbl> #> 1 2 american_beech 20 0.800 0 0.0196 #> 2 3 sugar_maple 15 1.00 0.0314 0 #> 3 4 american_beech 12 0.400 0 0.0962 #> 4 5 sugar_maple 35 1.40 0.0113 0 #> 5 7 sugar_maple 22 0.600 0.0167 0.139 #> 6 9 sugar_maple 42 1.40 0.0167 0.0380