Based on two tree censuses, compute the average annual growth in dbh for all
trees.
compute_growth(census_1, census_2, id)
| census_1 | A data frame of the first census. |
|---|---|
| census_2 | A data frame of the second (later) census |
| id | Name of variable that uniquely identifies each tree common
to |
An sf data frame with column growth giving the average
annual growth in dbh.
Other data processing functions:
create_bayes_lm_data(),
create_focal_vs_comp()
library(dplyr) library(stringr) growth_ex <- compute_growth( census_1 = census_1_ex %>% mutate(sp = to_any_case(sp) %>% factor()), census_2 = census_2_ex %>% filter(!str_detect(codes, "R")) %>% mutate(sp = to_any_case(sp) %>% factor()), id = "ID" )