View source: R/make_obj_for_traitenv.r
make_obj_for_traitenv | R Documentation |
make_obj_for_traitenv
combines the three data items needed for analyzing trait-environment association
into a single object of class TE_obj
. In the process, empty sites and non-occurring species are deleted. There is an option
for stronger deleting criteria.
make_obj_for_traitenv(E, L, T, cutoff = 0)
E |
a numeric n-vector or n by p matrix containing p environmental variable(s) of n sites |
L |
a n by m matrix or data frame of abundance values of m species in n sites |
T |
a numeric m-vector or m by q matrix containing q traits of m species |
cutoff |
minimal number of occurrences of species |
If E or T is a matrix, the column names are retained. If E or T is a vector, E gets name "env" and T gets name "trait". If you wish to retain the original name, enter E and T as data frames or single column matrices with a column name.
A named list,
L |
a sites by species matrix of abundances, after removal of species and sites, based on cutoff |
E |
a matrix of environmental values (rows are the same sites as the rows of L) |
T |
a matrix of trait values (rows are the same as the column of L) |
ter Braak (2019) New robust weighted averaging- and model-based methods for assessing trait-environment relationships. Methods in Ecology and Evolution (https://doi.org/10.1111/2041-210X.13278)
expand4glmm
and WA_p_max
.
## Not run: data("aravo", package = "ade4") Y <-aravo$spe trait <- scale(aravo$traits$SLA) env <- scale(aravo$env$Snow) obj <- make_obj_for_traitenv(env,Y, trait, cutoff=0) str(obj) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.