Evaluating landscape knowledge and lithic resource selection at the French Middle Paleolithic site of the Bau de l’Aubesier - Supplement
Authors: Cornel M. Pop; Lucy Wilson; Connie Browne
This repository contains the R code used in "Evaluating landscape knowledge and lithic resource selection at the French Middle Paleolithic site of the Bau de l’Aubesier". The following folders are included:
- text: Contains the R Markdown files used for performing the analyses and generating the figures that appear in the paper (except Figure 1, which was created manually). Each file can be run on its own to generate specific sections of the manuscript.
- R: Contains supporting code and functions used by the R Markdown files. Also includes code for processing and generating data.
- plots: Used to store figures generated by the R Markdown files.
- data: Used to store data needed by the R Markdown files.
NOTE: Most of the data may be downloaded from here. However, lithic assemblage and source data (bau_data.rds [also available as a .csv file] and sources_utm_abr [a shapefile]) are only available upon request (from Lucy Wilson).
Note: These instructions assume that you have installed Microsoft R Open 4.0.2 and RTools (version 4), and that you have a 64-bit machine. RTools may be obtained from here: https://cran.r-project.org/bin/windows/Rtools/rtools40.html. Note also that you may need more than 16 GB of RAM to render the hypothesis_3.rmd file.
-
Obtain the data files, save them to this folder, and unzip them. Unzipped files must be stored in the "data/" folder (e.g., "data/bau_data.rds").
-
Install the required R packages:
# Install packages required to run the R Markdown files:
utils::install.packages("colorspace", "pillar") # pre-req for ggspatial
utils::install.packages(c("rgdal", "raster", "rasterVis", "sf",
"MASS", "car", "data.table", "caret",
"ggplot2", "ggstance", "ggspatial", "cowplot",
"broom", "kableExtra", "magrittr"))
# Install optional packages (required to run optional scripts in the R folder:
utils::install.packages("rgrass7")
-
Set the working directory to "text" (i.e.,
setwd("text")). -
Render each of the R Markdown files (e.g.,
rmarkdown::render("hypothesis_1.Rmd")). Note that generated figures will be saved to the "plots/" folder.