fbeta4me: Functional Beta Biversity for MacroEcology

View source: R/fbeta4me.R

fbeta4meR Documentation

Functional Beta Biversity for MacroEcology

Description

It estimates the phylogenetic beta diversity of focal cells within a SpatVector object by considering neighboring cells located within a specified buffer.

Usage

fbeta4me(PAM, TRAITS, SHP, width = 10000, index.family="sorensen", verbose=TRUE)

Arguments

PAM

A presence/absence matrix where sites are organized in rows and species in columns.

TRAITS

A species x Traits matrix or a PCoA scores of functional traits. The row labels must exactly match the species names in the presence/absence matrix (PAM).

SHP

A SpatVector object representing cells distributed over a geographic space

width

Refers to the radius of the buffer. If the SpatVector object uses a latitude/longitude projection, the width is specified in meters.

index.family

Choose either the 'sorensen' or 'jaccard' dissimilarity index.

verbose

Logical, indicating whether messages and the progress bar are shown. The default is TRUE.

Value

The function returns a data frame that includes turnover, nestedness, total beta diversity, and the number of cells contributing to the mean diversity of the focal cell. The IDs of the cells are used as the row names of the data frame.

Author(s)

Guevara, R., roger.guevara@inecol.mx

References

Yang, J., Swenson, N. G., Zhang, G., Ci, X., Cao, M., Sha, L., ... & Lin, L. (2015). Local-scale partitioning of functional and phylogenetic beta diversity in a tropical tree assemblage. Scientific Reports, 5(1), 12731.

Examples


data(TRAITS)
data(PAM)
SHP <- terra::vect(paste(system.file("extdata", package = "inecolr"),
"/test.shp", sep=""))
SHP <- SHP[1:10]
f_beta <- fbeta4me(PAM, TRAITS, SHP, width = 10000, index.family="sorensen")
head(f_beta)


data(TRAITS)
data(PAM)
SHP <- terra::vect(paste(system.file("extdata", package = "inecolr"),
"/test.shp", sep=""))
SHP <- SHP[1:10]
f_beta <- fbeta4me(PAM, TRAITS, SHP, width = 10000, index.family="sorensen", verbose=FALSE)
head(f_beta)

inecolr documentation built on June 8, 2025, 11:26 a.m.

Related to fbeta4me in inecolr...