Skip to content

Code used to assess the accuracy of methods for estimating trait distributions.

License

Notifications You must be signed in to change notification settings

EnquistLab/trait_bootstrap_ms

Repository files navigation

Header

Sweet Dreams are Made of Bootstrapping: Bootstrapping outperforms community-weighted approaches for estimating the shapes of phenotypic distributions

Code Datasets Manuscript

This project contains code associated with work that compares the performance of parametric boostrapping, non-parametric bootstrapping and mean-field approaches to inferring trait distribution.

Repo Structure

  • data: datasets used for analyses
  • figures: figures and tables used in the manuscript and supplementary materials
  • images: images used for figure or table insets
  • output_data: processed data post simulations and bootstrapping. These are used for figure generation
  • r_functions: functions for data analyses and cleaning that are used in the main script
  • scripts: scripts used for implementation of {traitstrap} on the various datasets as well as figure generation

Dependencies

Dependencies are managed and stored using {renv} so it is possible to restore the last 'working state' of this project by calling renv::restore(). This will install the correct package versions for this project.

Version of {traitstrap}

Some of the code for generating distributions and simulations were built on an older version of {traitstrap} (v 0.0.0.901). This legacy version is featured in the repository as a .tar.gz and can be installed by running the following code:

if(packageDescription("traitstrap", fields = "Version")!="0.0.0.901" |
     is.na(packageDescription("traitstrap", fields = "Version"))){
    install.packages("traitstrap_0.0.0.901.tar.gz",repos = NULL,method = "source") #this code is designed for version 0.0.0.901 of traitstrap, which we include in this Github repo
  }

About

Code used to assess the accuracy of methods for estimating trait distributions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published