Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/combinespecies.r
Creates species combinations to be used in indicator value analyses.
1 2 | combinespecies(X, max.order = 3, min.occ = 0, FUN = min, verbose = FALSE,
add.names = TRUE, ...)
|
X |
A community data table with sites in rows and species in columns. This table can contain either presence-absence or abundance data. |
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 |
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).
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). |
Miquel De Cáceres Ainsa, CTFC
De Cáceres, M., Legendre, P., Wiser, S.K. & Brotons, L (in preparation). Using species combinations in indicator analyses.
indicators
, strassoc
, signassoc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(stats)
data(wetland) ## Loads species data
## 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.