alpha.fd.fe {mFD}R Documentation

Compute the set of indices based on number of species in Functional Entities

Description

This function computes the set of indices based on number of species in Functional Entities (FEs) following Mouillot et al. (2014).

Usage

alpha.fd.fe(
  asb_sp_occ,
  sp_to_fe,
  ind_nm = c("fred", "fored", "fvuln"),
  check_input = TRUE,
  details_returned = TRUE
)

Arguments

asb_sp_occ

a matrix linking occurrences (coded as 0/1) of species (columns) in a set of assemblages (rows). Warning: An assemblage must contain at least one species.

sp_to_fe

a list with details of species clustering into FE from sp.to.fe.

ind_nm

a vector of character strings with the names of functional diversity indices to compute among 'fred', 'fored' and 'fvuln'. Indices names must be written in lower case letters. Default: all the indices are computed.

check_input

a logical value indicating whether key features the inputs are checked (e.g. class and/or mode of objects, names of rows and/or columns, missing values). If an error is detected, a detailed message is returned. Default: check.input = TRUE.

details_returned

a logical value indicating whether details about indices computation should be returned. These details are required by alpha.fd.fe.plot to plot FEs indices.

Value

A list with:

Author(s)

Camille Magneville

References

Mouillot et al. (2014) Functional over-redundancy and high functional vulnerability in global fish faunas on tropical reefs. PNAS, 38, 13757-13762.

Examples

# Load Species*Traits dataframe:
data('fruits_traits', package = 'mFD')

# Load Traits categories dataframe:
data('fruits_traits_cat', package = 'mFD')

# Load Assemblages*Species matrix:
data('baskets_fruits_weights', package = 'mFD')

# Remove continuous trait:
fruits_traits <- fruits_traits[, -5]
fruits_traits_cat <- fruits_traits_cat[-5, ]

# Compute gathering species into FEs:
sp_to_fe_fruits <- mFD::sp.to.fe(sp_tr = fruits_traits, 
 tr_cat = fruits_traits_cat, 
 fe_nm_type = 'fe_rank', check_input = TRUE)
 
# Get the occurrence dataframe:
asb_sp_fruits_summ <- mFD::asb.sp.summary(asb_sp_w = baskets_fruits_weights) 
asb_sp_fruits_occ <- asb_sp_fruits_summ$'asb_sp_occ'

# Compute alpha fd indices:
alpha.fd.fe(
   asb_sp_occ       = asb_sp_fruits_occ, 
   sp_to_fe         = sp_to_fe_fruits,
   ind_nm           = c('fred', 'fored', 'fvuln'),
   check_input      = TRUE, 
   details_returned = TRUE)

[Package mFD version 1.0.7 Index]