%0 Generic %A J. B. Kraft, Nathan %A D. Ackerly, David %D 2016 %T Supplement 2. Community assembly simulation code for use in the R programming language. %U https://wiley.figshare.com/articles/dataset/Supplement_2_Community_assembly_simulation_code_for_use_in_the_R_programming_language_/3510423 %R 10.6084/m9.figshare.3510423.v1 %2 https://ndownloader.figshare.com/files/5576496 %2 https://ndownloader.figshare.com/files/5576497 %K Yasuní %K functional traits %K null models %K habitat filtering %K phylogenetic community structure %K power analysis %K Ecuador %K functional equivalence %K coexistence theory %K Forest Dynamics Plot %K simulation modeling %K neutral theory %K Environmental Science %K Ecology %X

File List

community_assembly_simulations.txt

Description

A set of functions in the R programming language for simulating community assembly randomly (with or without weighting species by abundance), by trait-based competition, or by trait-based habitat filtering. The linked text file contains a series of R functions, a brief demonstration of the functions, commentary on the algorithms, and references. There are three key functions, described below, and a series of smaller functions that support them. More detailed descriptions can be found as in the file itself.

random_assembly(pool, final_richness, abund=NULL)

Randomly samples final_richness number of species from a vector of species names given in pool. Sampling is occurence weighted if a vector of abundances is specified in the abund argument- default is no abundance weighting.

compete_until(nfinal, community)

Takes a data frame community with species names in column 1 and traits in subsequent columns and runs a competition algorithm to cull the community unitl nfinal taxa remain. At each step, the algorithm identifies the most similar pair of species based on trait similarity and randomly removes one. Ties are broken randomly.

filter_until(nfinal, community, optima)

Takes a data frame community with species names in column 1 and traits in subsequent columns and runs a habitat filtering algorithm to cull the community unitl nfinal taxa remain. At each step, the algorithm identifies the species that is farthest from the trait optima and removes it. Ties are broken randomly. The community can have from 1 to many traits, but the optima vector must have the same number of elements as the number of traits in the community dataframe.

%I Wiley