pbeta4me: Phylogenetic Beta Biversity for MacroEcology

View source: R/pbeta4me.R

pbeta4meR Documentation

Phylogenetic 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

pbeta4me(PAM, PHYLO, SHP, width = 10000, index.family="sorensen", verbose =TRUE)

Arguments

PAM

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

PHYLO

A phylogenetic rooted tree, which includes branch lengths, is required. The tip 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

Graham, C. H., & Fine, P. V. (2008). Phylogenetic beta diversity: linking ecological and evolutionary processes across space in time. Ecology letters, 11(12), 1265-1277.

Examples


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


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

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

Related to pbeta4me in inecolr...