# NOT RUN {
library(ggplot2)
library(sf)
library(dplyr)
comp_dist <- 1
ggplot(blocks_ex) +
geom_sf() +
geom_sf(data = growth_spatial_ex)
focal_vs_comp_ex <- growth_spatial_ex %>%
mutate(basal_area = 0.0001 * pi * (dbh1 / 2)^2) %>%
create_focal_vs_comp(comp_dist, blocks = blocks_ex, id = "ID", comp_x_var = "basal_area")
# }
Run the code above in your browser using DataLab