endemism: Endemism of a set of localities

View source: R/endemism.R

endemismR Documentation

Endemism of a set of localities

Description

The function calculates either the proportion of endemic taxa at every locality or counts the number of endemic species

Usage

endemism(dat, tax = NULL, loc = NULL, prop = TRUE)

Arguments

dat

(data.frame) Occurrence table, continency (rows are taxa, columns are localities) table or a RasterStack.

tax

(character) Variable name of the occurring taxa (variable type: factor or character - such as "genus"

loc

(character) Name of the locality variable, for instance samples IDs, sites, regions or geographic cells.

prop

(logical) Set to TRUE for proportional endemism (default). Setting this to FALSE will output the the number of endemic species.

Examples

# create a partitioning
data(ceno6)
oneC6 <- bgpart(ceno6,bin=NULL, tax="trinomen", cell="icos", ocq=10, base="network", method="infomap")
# add membership to every row based on the cells
ceno6$membership <- oneC6[ceno6$icos,"grouping"]
# endemism in regions
endemism(ceno6, tax="trinomen", loc="membership")

adamkocsis/obigeo documentation built on Oct. 14, 2024, 8:46 a.m.