DOI: 10.6084/m9.figshare.3564183.v1
title: Supplement 1. Code for conducting the analyses and generating the figures in this paper, including partially processed data.

description: File List rodent_wrapper.r (MD5: 2c73de19e83585b1f4c37ebb9ee9ab1f)<br>R script that imports the eBird, map, and equal-area icosahedron data, summarizes the population-level migration patterns, runs the statistical analyses, and outputs figures. movement_fxns.r (MD5: 4417176e0bfed18b3c2188eb26a5908e)<br>R script that holds the relevant functions for executing the hb-migration.R script. MARK_analyses.r (MD5: 0a59e029a076e1bec8b4fb529af4c361)<br>R script that imports the Breeding Bird Laboratory data and outputs the figures for the Appendix. Description The code in this supplement allows for the analyses and figures in the paper to be fully replicated using a subset of the published Portal data set which includes individual-level rodent data from 1989–2009. Species evaluated include granivores, folivores, and insectivores: Peromyscus eremicus (PE), Peromyscus maniculatus (PM), Peromyscus leucopus (PL), Onychomys torridus (OT), Onychomys leucogaster (OL), Dipodomys merriami (DM), Dipodomys ordii (DO), Dipodomys spectabilis (DS), Chaetodipus baileyi (PB), Chaetodipus penicillatus (PP), Perognathus flavus (PF), Chaetodipus intermedius (PI), Chaetodipus hispidus (PH), Sigmodon hispidus (SH), Sigmodon fulviventer (SF), Sigmodon ochrognathus (SO), Neotoma albigula (NAO), Baiomys taylori (BA), Reithrodontomys megalotis (RM), Reithrodontomys fulvescens (RF), and Reithrodontomys montanus (RM). <i>Requirements: </i>R 2.x, Program MARK (http://www.phidot.org/software/mark), the files containing data and functions specific to this code and the following packages: ape, calibrate, fields, geiger, ggbiplot, ggmap, ggplot2, gridExtra, picante, PhyloOrchard,plyr, reshape2, and RMark. The analyses can then be replicated by changing the working directory at the top of the file rodent_wrapper.R to the location on your computer where you have stored the .R and .csv files and running the code. Code for Part I of rodent_wrapper.R should take approximately 30 minutes to run, but depending on the capabilities of the computer used to run the code, it may take many hours to run the code in MARK_analyses.R. Figures should output as pdf, png, or eps files in your working directory. Part II of rodent_wrapper.R continues the anaylsis using the MARK results. If you download the raw data and run the start to finish, you will need a workstation with large memory to run the program in a reasonable amount of time since the files are large and the analyses require a lot of memory. <i>Version Control Repository: </i>The full version control repository for this project (including post-publication improvements) is publicly available at https://github.com/weecology/portal-rodent-dispersal. If you would like to use the code in this Supplement for your own analyses it is strongly suggested that you use the equivalent code in the repositories as this is the code that is being actively maintained and developed. <i>Data use: </i>Partially-processed data is provided in the GitHub repository for the purposes of replication. The raw data should be obtained from the original data providers (Ernest et al. 2009) and can be downloaded from <i>Ecological Archives</i> (http://www.esajournals.org/doi/abs/10.1890/08-1222.1).