SR_geo.Rd
This function is used to calculate the species richness (SR) for the geographic features of interest from a list of community matrices.
SR_geo(data, geo_group)
A list of community matrices that have column with the geographic names. Each entry in
the list should be a different species group and that list entry should be named with the group name.
The resulting object from the com_matrix()
is already formatted for this function.
A character equal to the column name of the data frame(s) in 'data' in which the geographic feature names are stored
A data frame that holds the SR values for each geographic feature and species group.
if (FALSE) {
library(here)
library(reshape)
dat <- read.csv(file.path(here(), 'data_raw', 'IBT_Herp_Records_v6.csv'), header=TRUE)
coms <- com_matrix(species = "binomial",
geo_group = "bank",
taxa_group = "class",
status = "bnk_status",
stat_levels = c('N', "E"),
total = TRUE,
data = dat)
SR <- SR_geo(data = coms, geo_group = "bank")
}