combinespecies {indicspecies} | R Documentation |
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,
...
)
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 |
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 |
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).
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).
Author(s)
Miquel De Cáceres Ainsa, EMF-CREAF
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
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")