Description Usage Arguments Details Value Examples
View source: R/comm.sampling.R
Converts simulation result into site-by-species matrix of abundances, and optionally in the same step simulates random sampling with fixed number of individuals.
1 | comm.sampling(x, type = c("full", "random"), size)
|
x |
community and trait data matrix produced by |
type |
Type of sampling. If |
size |
Number of individuals in the random samples. It should be smaller
than number of individuals in simulated (sub)communities. Otherwise,
|
If type=="full"
it simply converts simulation results from long to wide format.
If type=="random"
it randomly selects size
individuals in each (sub)community
and abundances in these samples are converted into site-by-species matrix format.
A site-by-species matrix containing abundances.
1 2 3 4 5 6 7 8 9 | x<-comm.simul(S=20, J=30)
str(x$final.community)
w<-comm.sampling(x$final.community,type="full")
str(w)
w.rarefied<-comm.sampling(x$final.community,type="random",size=10)
rowSums(w)
rowSums(w.rarefied)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.