betagrid {bivariatemaps} | R Documentation |
betagrid: Calculates Beta Diversity for all the Grid Cells in Comparison with Their Nearest Neighbor Cells
Description
Uses a 'gridded' shapefile and its corresponding community data matrix to calculate beta diversity for each focal grid cell in relation to its neighbor cells (for example, 8 nearest neighbors).
Usage
betagrid(
gridshp,
comp,
xfeature,
yfeature,
radius,
phylotree,
phylobeta = F,
index = "sorensen"
)
Arguments
gridshp |
Gridded Shapefile ("SpatialPolygonsDataFrame"). |
comp |
community data matrix (species occurrence on each grid cell). |
xfeature |
number of the feature within the gridded shapefile corresponding to the longitude. |
yfeature |
number of the feature within the grid shapefile corresponding to the latitude. |
radius |
the radius (in degrees) that define the maximum distance to select neighbor cells (for example, use the resolution of the gridded shapefile). |
phylotree |
optional phylogenetic tree ("phylo" class). It can also be a "phylo" class functional dendrogram. |
phylobeta |
Optional boolean whether or not to calculate or not phylogenetic beta diversity (see "phylo.beta.pair" function in "betapart" package) instead of the usual beta diversity (see "beta.pair" function in "betapart" package). Default is F. |
index |
to calculate "sorensen" or "jaccard". Default is "sorensen". |
Value
A data frame with values of mean turnover, mean nestedness, and mean beta diversity for each grid cell.
Examples
# https://rfunctions.blogspot.com/2015/08/calculating-beta-diversity-on-grid.html