Description Usage Arguments Value Examples
This functions gives the specific richness (mean and standard deviation) for each group of data contained in the argument
MYGROUP
(e.g. treatments, types of site, sites etc.). Additionally, super_rich.group()
also returns a dataframe containing all the species
data for each group, sorted out by decreasing order of abundance.
For instance, if MYDATA
is a dataframe containing the abundance (or presence/absence) of 100 species in 30 sites
belonging to three groups of equal size named A, B and C (detailed in MYGROUP
); then super_rich.group()
will return the mean
specific richness of the A, B and C sites, and create 3 different dataframes:
One containing all the species of the 10 sites of group A (ordered by decreasing abundance);
One containing all the species of the 10 sites of group B (ordered by decreasing abundance);
One containing all the species of the 10 sites of group C (ordered by decreasing abundance).
Note that the last line of each of these dataframes is the sum of species abundances: i.e. the line used to order the dataframes' columns!
1 | super_rich.group(MYDATA, MYGROUP)
|
MYDATA |
A contingency table (typically, a matrix with species as columns and sites/releves as lines). |
MYGROUP |
A factor with a length matching the number of rows of |
Two list objects: one named richness_group
and another named topabun_group
. The former contains the specific richness for each group,
the latter contains the subset of data of each group (the aforementioned dataframes).
1 2 3 4 5 6 7 8 9 10 11 12 | library(vegan)
data("dune")
data("dune.env")
# Creates a list containing the species richness per group.
aa <- super_rich.group(MYDATA = dune, MYGROUP = dune.env$Use)[[1]]
# Creates a list containing the subset dataframes for each group.
bb <- super_rich.group(MYDATA = dune, MYGROUP = dune.env$Use)[[2]]
# You can also create a list of lists by excluding the
# double-brackets: i.e. [[]]:
cc <- super_rich.group(MYDATA = dune, MYGROUP = dune.env$Use)
aa <- cc[[1]]
bb <- cc[[2]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.