Description Usage Arguments Details Value Examples
View source: R/trait.sampling.R
Randomly selects individuals for trait value measurement and gives back raw measured traits or their means
1 | trait.sampling(x, ITV = FALSE, aggregate = TRUE, n = 5)
|
x |
community and trait data matrix produced by |
ITV |
If |
aggregate |
If |
n |
Number of sampled individuals |
It simulates the real world situation that not all individuals are collected for trait measurement.
If ITV==FALSE
, all individuals belonging to the species are pooled, and then n
randomly selected individuals are measured. If ITV==TRUE
, n
individuals are
measured in each (sub)community, where the species occur. If the occurring individuals are
less than n
, all individuals are measured.
If aggregate==TRUE
, meta-community or subcommunity level means are calculated, otherwise
raw measurements are returned.
data.frame with fields: species
, site
(only if ITV=TRUE
),
trait.a
, trait.b
, trait.c
(raw values or means depending on parameter aggregate
)
1 2 3 4 5 6 7 8 | x<-comm.simul(S=20, J=30)
str(x)
w<-trait.sampling(x$final.community)
w
w<-trait.sampling(x$final.community,ITV=TRUE,aggregate=TRUE)
str(w)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.