Description Usage Arguments Details Value See Also Examples
Function calculating fourth corner analysis between sample attributes (environmental variables) and species attributes (traits) and testing it by row based, column based or max permutation test.
1 2 3 4 5 6 7 8 9 10 | test_fourth(env, com = NULL, traits = NULL, cwm = NULL, perm = 499,
test = "max", parallel = NULL, p.adjust.method = p.adjust.methods,
adjustP = FALSE)
## S3 method for class 'testFOURTH'
print(x, digits = max(3, getOption("digits") - 3),
missing.summary = FALSE, ...)
## S3 method for class 'testFOURTH'
coef(object, ...)
|
env |
Vector, matrix or data frame with sample attributes (environemntal variables). |
com |
Matrix of data frame with species composition data. |
traits |
Vector, matrix or data frame with species attributes (traits) |
cwm |
An object of the class |
perm |
Number of permutations. |
test |
Vector of character values. Which test should be conducted? Partial match to |
parallel |
NULL (default) or integer number. Number of cores for parallel calculation of modified permutation test. Maximum number of cores should correspond to number of available cores on the processor. |
p.adjust.method |
A string indicating the method of P-value adjustement, see |
adjustP |
Logical, default FALSE. Should be the P-values adjusted? If |
x, object |
object of the class |
digits |
number of digits reported by |
missing.summary |
Logical; should be the summary of values missing in |
... |
Other arguments for |
Environmental variables, species composition and traits can be provided in two ways: either each object separately, using arguments env, com and traits, or using only env and cwm; in the later case, the function extract is used to extract the com and traits from the cwm object.
Specific issue related to weighted mean is the case of missing species attributes. In current implementation, species with missing species attributes are removed from sample x species matrix prior to permutation of species attributes among species.
Function test_fourth returns the list of the class "testFOURTH" (with print and summary methods), which contains the following items:
call Function call.
out Data frame with results of calculation; first two columns contain the original fourth corner metric (r_fc) and its Chessel transformation (r_ch); following columns contain some of the following results of permutation tests: P.row, P.col and P.max. If adjustP = TRUE, the last column contains P values adjusted by p.adjust function.
miss List with missing values of env, traits or cwm (the last provided for compatibility with test_cwm function and refers to samples which, after removing missing traits values, do not contain any species.)
param Setting of input parameters (perm and test).
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.