test {tabula} | R Documentation |
Diversity Test
Description
Compares Shannon/Simpson diversity between samples.
Usage
test_shannon(x, y, ...)
test_simpson(x, y, ...)
## S4 method for signature 'numeric,numeric'
test_shannon(x, y, ...)
## S4 method for signature 'matrix,missing'
test_shannon(x, adjust = "holm", ...)
## S4 method for signature 'data.frame,missing'
test_shannon(x, adjust = "holm", ...)
## S4 method for signature 'numeric,numeric'
test_simpson(x, y, adjust = "holm", ...)
## S4 method for signature 'matrix,missing'
test_simpson(x, adjust = "holm", ...)
## S4 method for signature 'data.frame,missing'
test_simpson(x, adjust = "holm", ...)
Arguments
x , y |
A |
... |
Further arguments to be passed to internal methods. |
adjust |
A |
Value
If x
and y
are numeric
vectors, returns a list
containing the
following components:
statistic
The value of the t-statistic.
parameter
The degrees of freedom for the t-statistic.
p.value
The p-value for the test.
If x
is a matrix
or a data.frame
, returns a table of adjusted p-values
in lower triangular form.
Functions
-
test_shannon(x = matrix, y = missing)
: Produces two sided pairwise comparisons. -
test_shannon(x = data.frame, y = missing)
: Produces two sided pairwise comparisons. -
test_simpson(x = matrix, y = missing)
: Produces two sided pairwise comparisons. -
test_simpson(x = data.frame, y = missing)
: Produces two sided pairwise comparisons.
Author(s)
N. Frerebeau
References
Magurran, A. E. (1988). Ecological Diversity and its Measurement. Princeton, NJ: Princeton University Press. doi:10.1007/978-94-015-7358-0.
Examples
## Data from Magurran 1988, p. 145-149
oakwood <- c(35, 26, 25, 21, 16, 11, 6, 5, 3, 3,
3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0)
spruce <- c(30, 30, 3, 65, 20, 11, 0, 4, 2, 14,
0, 3, 9, 0, 0, 5, 0, 0, 0, 0, 1, 1)
test_shannon(oakwood, spruce)
test_simpson(oakwood, spruce)
## Data from Conkey 1980, Kintigh 1989
data("cantabria")
test_shannon(cantabria)
test_simpson(cantabria)