Calculates species-specific densities and species diversity metrics (species richness, Shannon-Wiener diversity, Simpson's diversity, Pielou's J evenness) for each neighborhood in the provided data frame. Densities can be provided as area covered in the neighborhood, area covered per hectare, or the sum of horizontal angles.
neighborhood_summary( neighbors, id_column, radius, densities = "raw", neighbors_incl = "all", edge_correction = F, x_limit = NULL, y_limit = NULL )
neighbors | Data frame of neighborhoods outputted by
|
---|---|
id_column | Name of column in |
radius | Numeric vector describing neighborhood radius in meters. |
densities | Character specifying the type of density measurements to calculate - raw (m^2 per hectare), proportional (as proportions of overall tree density), angular (angular size of trees). |
neighbors_incl | Character specifying whether all neighbors
( |
edge_correction | Boolean indicating whether edge correction should be used. |
x_limit | maximum possible x-coordinate in the stand (only required if
|
y_limit | maximum possible y-coordinate in the stand (only required if
|
Data frame containing a summary for each neighborhood in
neighbors
.
This function contains an optional argument for handling edge effects. When specified, the density and species richness values for neighborhoods that overlap the stand boundary will be multiplied according to the fraction of their neighborhood that is missing from the stand. Species richness values are rounded to the nearest whole number.
# Create a neighborhoods object nbhds <- neighborhoods(mapping, stands = "AB08", radius = 10) # Summarize neighborhoods using angular densities nbhd_summ <- neighborhood_summary(nbhds, id_column = "tree_id", radius = 10, densities = "angular") # Using raw densities with edge correction nbhd_summ <- neighborhood_summary(nbhds, id_column = "tree_id", radius = 10, densities = "raw", edge_correction = T, x_limit = 100, y_limit = 100)