Roland A. Knapp (roland.knapp(at)ucsb.edu)
Mark Q. Wilber (mqwilber(at)gmail.com)
Thomas C. Smith (tcsmith(at)ucsb.edu
This repository is organized as a reproducible research compendium, and describes frog translocations to reestablish populations of the endangered mountain yellow-legged frog. It contains data on frog survival following translocations conducted during the period 2006-2020, code to identify predictors of survival using R, a notebook to document project progress to date, and a manuscript (in preparation). Throughout this repository, frog populations are referenced only by 5-digit unique site identifiers. No site names or x-y coordinates are provided to protect these sensitive populations to the maximum extent possible.
This repository contains the following directories and files:
code/
directory:Rmd
files that contain code to create and analyze the project datasets.data/
directory: Raw data and cleaned data.doc/
directory: Manuscript and notebook files.out/
directory: Output files.
Notebooks are available in the doc/ and out/notebooks_code/ directories. Links are to README files that describe how to view notebooks directly from GitHub. The doc/
notebook describes issues of interest related to dataset creation and analysis. The out/notebooks_code/
notebooks are rendered from the Rmd
files in the code/
directory, and describe dataset creation/data analysis steps for each population.
- Install the package manager anaconda or miniconda (https://docs.continuum.io/anaconda/install/).
- Build the conda environment specified in the environmental.yml to install most of the R packages needed to run the analysis. This can be done on the command line using the command
conda env create -f environment.yml
.- See here.
- Activate the environment in the terminal
conda activate r_env_translocation
- NOTE: You don't have to use the conda environment and can use your native R build. Just ensure you have the packages installed that are listed in the
environment.yml
file.- For Linux, we have found that to install the R package
devtools
you are often prompted to install additional software outside of R. Linux typically tells you what additional packages you need to successfully installdevtools
in any error message you might get when installing this R package.
- For Linux, we have found that to install the R package
- First, run
make install_packages
to ensure that you have the necessary packages installed in your R environment. - To run all of the analyses, type
make all
in the command line. - To run only the translocation analysis execute
make trans_analysis
in the command line. - To run only the viability analysis execute
make viability_analysis
in the command line. - To clean you directory of extraneous files execute
make clean
in the command line.
Roland Knapp, Research Biologist, University of California Sierra Nevada Aquatic Research Laboratory, Mammoth Lakes, CA 93546 USA; rolandknapp(at)ucsb.edu, https://mountainlakesresearch.com/roland-knapp/