Description Usage Arguments Details References Examples
View source: R/reduceRandomizations.R
The metricsNnulls function creates lists of lists of dataframes. This function will combine the dataframes from each null model into a single data frame. The output is a more manageable list of dataframes.
1 | reduceRandomizations(randomizations.list)
|
randomizations.list |
The results of a call to metricsNnulls() |
Given a list of lists of dataframes, such as those that come from a call to metricsNnulls, where the first level of the list relates to a given randomization, and each second level is a data frame containing the calculated metrics after randomization according to a given null model, reduces the results to a simpler list of data frames, where each data frame contains all the results from a given null model from the input randomizations.list.
Miller, E. T., D. R. Farine, and C. H. Trisos. 2016. Phylogenetic community structure metrics and null models: a review with new methods and software. Ecography DOI: 10.1111/ecog.02070
1 2 3 4 5 6 7 8 9 10 11 12 | #simulate tree with birth-death process
tree <- geiger::sim.bdtree(b=0.1, d=0, stop="taxa", n=50)
sim.abundances <- round(rlnorm(5000, meanlog=2, sdlog=1)) + 1
cdm <- simulateComm(tree, richness.vector=10:25, abundances=sim.abundances)
#below not run for timing issues on CRAN
rawResults <- metricsNnulls(tree, cdm, metrics=c("richness", "NAW_MPD"),
nulls=c("richness", "frequency"))
results <- reduceRandomizations(rawResults)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.