[go: up one dir, main page]

Skip to content

This repository contains the R code and the associated data files that were used to execute the entire workflow for the manuscript "Disruption of trait-environment relationships in African megafauna occurred in the middle Pleistocene" (published in Nature Communications)

License

Notifications You must be signed in to change notification settings

lauerd/MegafaunaEcometrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repository contains the R code and the associated data files that were used to execute the entire workflow for the following project, which is now a published manuscript (cited in APA format):

Lauer, D. A., Lawing, A. M., Short, R. A., Manthi, F. K., Müller, J., Head, J. J., & McGuire, J. L. (2023). Disruption of trait-environment relationships in African megafauna occurred in the middle Pleistocene. Nature Communications, 14(1), 4016.

Usage Instructions

By running the "code_for_project.R" file, a user can reproduce all of the analytical outputs and figures that are included in the published manuscript.

To run the code file, first download the file and the "data_files" folder. Ensure that both the file and folder are in the same directory, because the folder contains the data files that the code processes and analyses. Then, download and install the RStudio Desktop integrated development environment for R. Check out the RStudio User Guide for more information on how to use it. Then, open RStudio, and use it to install the following R packages (note that many of these packages may have more updated versions at this point):

  • animation (version 2.6)
  • colorspace (version 2.0.2)
  • cowplot (version 1.0.0)
  • e1071 (version 1.7.9)
  • fields (version 10.0)
  • geometry (version 0.4.2)
  • ggplot2 (version 3.3.5)
  • grDevices (version 3.6.1)
  • grid (version 3.6.1)
  • gridExtra (version 2.3)
  • Hmisc (version 4.3.0)
  • iNEXT (version 2.0.20)
  • phytools (version 0.7.47)
  • plot3D (version 1.1.1)
  • plyr (version 1.8.6)
  • raster (version 3.4.5)
  • readxl (version 1.3.1)
  • rgdal (version 1.5.23)
  • rgeos (version 0.5.5)
  • segmented (version 1.1.0)
  • sp (version 1.4.5)
  • stringr (version 1.4.0)
  • tibble (version 3.1.6)

With the packages installed, open the code file in RStudio and run the code. Note that the code was written using R version 3.6.1.

About

This repository contains the R code and the associated data files that were used to execute the entire workflow for the manuscript "Disruption of trait-environment relationships in African megafauna occurred in the middle Pleistocene" (published in Nature Communications)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages