Learn R Programming

indicspecies (version 1.7.15)

combinespecies: Combines species from a community table

Description

Creates species combinations to be used in indicator value analyses.

Usage

combinespecies(
  X,
  min.order = 1,
  max.order = 3,
  min.occ = 1,
  FUN = min,
  verbose = FALSE,
  add.names = TRUE,
  ...
)

Value

An list with:

  • XC - A matrix containing the abundance/occurrence of each species combination.

  • C - A binary matrix describing the set of species forming each combination ('0' means that the species is not included, and '1' means that the species is included).

Arguments

X

A community data table with sites in rows and species in columns. This table can contain either presence-absence or abundance data.

min.order

Minimum number of species conforming species combinations.

max.order

Maximum number of species conforming species combinations.

min.occ

Threshold for minimum occurrence. Combinations with lower values are not kept.

FUN

Function to be calculated for all species forming the species combination. Accepted values are min, max, sum and mean.

verbose

If TRUE, prints the results of each step.

add.names

If TRUE, adds the names of the species combinations to the output matrix. Species combination names are lists of species concatenated using character '+'.

...

Additional arguments for function FUN.

Author

Miquel De Cáceres Ainsa, EMF-CREAF

Details

This function allows creating a data table where rows are sites and columns are combinations of species. Values for a given column of this matrix are derived from the abundance values of the species forming the corresponding combination. In particular, the abundance value for a given combination in a given site is equal to the value returned by function 'FUN' (normally the minimum) among the site values of all species forming the combination. The matrix 'XC' returned by this function can be used in functions strassoc and signassoc. Alternatively, indicators and related functions provide a more elaborated way to explore the indicator value of the simultaneous occurrence of sets of species (i.e. species combinations).

References

De Cáceres, M., Legendre, P., Wiser, S.K. and Brotons, L. 2012. Using species combinations in indicator analyses. Methods in Ecology and Evolution 3(6): 973-982.

See Also

indicators, strassoc, signassoc

Examples

Run this code
library(stats)

## Loads species data
data(wetland) 

## Create species combinations
Y <- combinespecies(X=wetland, max.order=3, min.occ=5, verbose=TRUE)

## Creates three site groups using kmeans
wetkm <- kmeans(wetland, centers=3) 

## Calculate indicator value of species combinations for each of the three site groups
strassoc(Y$XC, cluster=wetkm$cluster,func="IndVal.g") 

## Calculate point biserial correlation value of species combinations 
## for each of the three site groups
strassoc(Y$XC, cluster=wetkm$cluster,func="r.g") 

Run the code above in your browser using DataLab