View source: R/dat4MLM2TE_obj.r
dat4MLM2TE_obj | R Documentation |
dat4MLM2TE_obj
creates from data in a format for glm(m)/MLM a TE_obj
object (see make_obj_for_traitenv
), which consists of
trait, environment and abundance data. The argument dat
is usually created using
expand4glmm
. The function is used repeatedly in MLM3_p_max
.
dat4MLM2TE_obj(dat, cutoff = 0)
dat |
dataframe with names y, site, species, trait and env for values of abundance, identity of site and of species and the trait value and environmental value, respectively. |
cutoff |
minimal number of occurrences of species |
The order of data in dat should be in standard order, that is, first all data on species 1, then species 2, with all sites listed in identical order for each species (including zero abundances). BEWARE: The function currently works for a single trait and environmental variable only!!!!
An object of class TE_obj
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)
## Not run: data("Revisit") str(Revisit) TE_obj <- dat4MLM2TE_obj(Revisit) str(TE_obj) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.