Skip to content

mcgoodman/OLeary-et-al_2020_ESCO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains data, code, and statistical output for O'Leary et al. (2020), "Effects of estuary-wide seagrass loss on fish populations", in the journal Estuaries and Coasts.

The files in this repository are organized as follows:

The data directory contains data files used in the analyses. This directory has it's own README.

The R directory contains R scripts and R markdown files used to process data, run analyses, and generate output. There are two R markdown files, one each for the beach seine (seine_analyses.Rmd) and trawl (trawl_analyses.Rmd) analyses. These files contain the bulk of the analysis code. The other files are sourced by these files for use in various parts of the analysis:

  • simper_functions.Rmd contains R functions for formatting data for SIMPER analysis and for formatting and plotting the output of SIMPER analyses.
  • cluster_bootstrap.R contains functions for computing the mean and standard error of a given variable using a two-stage bootstrap, where data groups are sampled with replacement, and then observations within those groups are sampled with replacement as well. These functions are used in plotting data from the trawl surveys, which are clustered into sites.
  • pairwise_permanova.R contains a function to fit a PERMANOVA model for all possible pairwise comparisons between groups, applying a chosen p-value adjustment and returning the output in a table.
  • packages.R contains library() calls for all packages used in these analyses. The checkpoint package will install all of these packages (as they were on September 1st, 2020) when either trawl_analyses.Rmd or seine_analyses.Rmd are run for the first time. These packages are loaded in a separate script from the markdown files because checkpoint will not look for library() calls in R markdown documents.

The figures directory contains figures used in the manuscript; they are exported when running the trawl_analyses.Rmd and seine_analyses.Rmd files. Additional figures can be found in the PDF files generated by knitting the trawl_analyses.Rmd and seine_analyses.Rmd files.

The output directory contains the statistical output, tables, and figures from the trawl_analyses.Rmd and seine_analyses.Rmd files, with annotations.

All code in this repository was developed by Maurice Goodman. Feel free to reference or use the code for your own research or learning, but please do not use the data contained herein for other research works without first obtaining permission from the authors.

About

Analyses for O'Leary et al. (2021), "Effects of estuary-wide seagrass loss on fish populations" published in the journal "Estuaries and Coasts".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages