combinespecies: Combines species from a community table

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/combinespecies.r

Description

Creates species combinations to be used in indicator value analyses.

Usage

1
2
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, max.order

Minimum and 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.

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, CTFC

References

De Cáceres, M., Legendre, P., Wiser, S.K. & Brotons, L (in preparation). Using species combinations in indicator analyses.

See Also

indicators, strassoc, signassoc

Examples

 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") 

vegmod/indicspecies documentation built on Nov. 20, 2020, 7:04 a.m.