super_rich.group: Computation of species richness per groups

Description Usage Arguments Value Examples

Description

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:

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!

Usage

1
super_rich.group(MYDATA, MYGROUP)

Arguments

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 MYDATA (typically, a factor highlighting to which group each line belongs).

Value

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

Examples

 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]]

mrelnoob/airpoumpoum documentation built on Feb. 11, 2020, 8:19 p.m.