Learn R Programming

funrar (version 1.5.0)

funrar_stack: Compute all Functional Rarity Indices from stacked data.frames

Description

From a stacked (= tidy) data.frame and functional distance matrix compute all indices included in the package: functional uniqueness (regional, functional), functional distinctiveness (local, functional), geographical restrictedness (regional, extent), scarcity (local, abundance). Note: scarcity can only be computed if relative abundances are provided in the data.frame.

Usage

funrar_stack(com_df, sp_col, com, abund = NULL, dist_matrix)

Value

A list of 3 objects (or 4 if abund is not NULL):

Ui

a vector containing uniqueness values per species,

Di

a site-species matrix with functional distinctiveness values per species per site,

Ri

a vector containing geographical restrictedness values per species,

and if abund is not NULL,

Si

a site-species matrix with scarcity values per species per site.

Arguments

com_df

a stacked (= tidy) data.frame from a single community with each row representing a species in a community

sp_col

a character vector, the name of the species column in com_df

com

a character vector, the column name for communities names

abund

a character vector, the name of the column containing relative abundances values

dist_matrix

a functional distance matrix as given by compute_dist_matrix(), with species name as row and column names

See Also

uniqueness_stack(), distinctiveness_stack(), restrictedness_stack(), scarcity_stack()