Based on two tree censuses, compute the average annual growth in dbh for all trees.

compute_growth(census_1, census_2, id)

Arguments

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 census_1 and census_2 allowing you to join/merge both data frames.

Value

An sf data frame with column growth giving the average annual growth in dbh.

See also

Other data processing functions: create_bayes_lm_data(), create_focal_vs_comp()

Examples

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" )