Skip to content

Data, code and ms for west Texas bark beetle and tree defense study

Notifications You must be signed in to change notification settings

schwilklab/pine-resin-duct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pine-resin-duct

This repo contains data, code, figures, and methods for the Schwilk Lab resin duct project that originated with Erik Lindberg's MS thesis on resin duct and growth characteristics of pine trees in west Texas mountains. See ms-tables-figs.R for a single script that will produce all analyses, tables and figures as submitted to AJB (authors: Lindberg, Ferrenberg, and Schwilk).

DOI for this repository:

DOI

Requirements

R and R packages

These analyses require R and the following packages: dplyr, stringr, ggplot2, rgdal, raster, lme4, afex, ggmap, maptools. All packages are available directly through R.

Specific Methods

Topographic variable calculations

See topo_grid methods documentation located in the skyisland-climate repo hosted by schwilklab.

Drought value calculations

Palmers Modified Drought Index (PMDI) values were obtained from NOAA website and saved as a .csv file locally. Further explanation regarding the drought values can be found here. Drought values refer to the trans-Pecos region of Texas, which exact boundaries of the spatial location in reference can be found here. Code then calculates a three year running average of drought values and assigns it to a dataframe which will be called upon in a different script.

Statistical models, tables and figures for manuscript

The script ms-tables-figs.R conducts the necessary final analysis for the manuscript as submitted the AJB. Some intermediate steps in deciding final model structure are not shown in this code but are descrbed in the manuscript).

This script first sources a script to read data and run transformations (read_all.R). Then this script fits lmer-models and calculates approximate p-values, produces html and odt tables (tables 1, 2 , S1 and S2), and produces all figures for the submitted ms (Figs1-5).

About

Data, code and ms for west Texas bark beetle and tree defense study

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages