A repository dedicated to sharing how I processed and analyzed ecological data in R from fish surveys in Palau. The results of this project will be published soon.
The scripts for data collection and processing to analyzing the data within R Markdown are included in this data set along with the base data files needed for the project. The necessary files to run all the scripts are provided in csv format, except for the phylogenetic tree which is in tre format. The first script that needs to be run is fish_presabs.Rmd. This will generate the necessary files for fish_traits.Rmd and fish_tree.Rmd. From there you can run palau_env.Rmd to generate the environmental and geographic data summaries. The environmental and geographical data differ from a previously published manuscript (Rapacciuolo et al. 2019) because we calculated environmental data that only included measures in stratified lakes that were above the chemocline because fish cannot survive below the chemocline and our surface area had to be recalculated because several sites included in our study did not have measurements and we did not want user differences to influence our measurements. After running those collection scripts, you can run load_collection_data.Rmd. Once you have run that markdown file you can run most of the analyses markdown files except for stratification_NMDS_envfit_analyses.Rmd. To run that markdown file you need to run dbFD_results.Rmd first. With these scripts and the data files, you can now run all the scripts and generate the same figures found in the paper and the results to create the tables. Keep in mind that the paths to input and output files need to change to your local environment. Also, FishBase does occasionally update so for that, results may vary slightly and I have added the final trait file we used (final_traits_gnathostomata) that you can plug into load_collection_data.Rmd for all downstream purposes.
Rapacciuolo Giovanni, Beman J. Michael, Schiebelhut Lauren M. and Dawson Michael N. (2019). Microbes and macro-invertebrates show parallel β-diversity but contrasting α-diversity patterns in a marine natural experimentProc. R. Soc. B.28620190999 http://doi.org/10.1098/rspb.2019.0999