This document describes the code used to plot a correlation matrix of bioclimatic layers for use in climate envelope modeling.
This project uses the following non-standard library (corrplot):
library("corrplot")
and read in our correlation matrix:
Corr_Present <- read.delim("/Volumes/~hellmann/!Hellmann lab data/Personal_Documents/Jason_Docs/Hellmann Lab/R/Correlation_Matrix/Corr_Present.txt",
header = F)
View(Corr_Present)
## Error: X11 dataentry cannot be loaded
Next, we want to assign descriptive variable names:
colnames(Corr_Present) <- c("Mean_Temp", "Diurnal_Range", "Isothermality (Bio2/Bio7)",
"Temp_Seasonality (STDEV*100)", "Max_Temp_Warmest_Month", "Min_Temp_Warmest_Month",
"Temp_Annual_Range (Bio5-Bio6)", "Mean_Temp_Wettest_Quarter", "Mean_Temp_Driest_Quarter",
"Mean_Temp_Warmest_Quarter", "Mean_Temp_Coldest_Quarter", "Annual_Precip",
"Precip_Wettest_Month", "Precip_Driest_Month", "Precip_Seasonality", "Precip_Wettest_Quarter",
"Precip_Driest_Quarter", "Precip_Warmest_Quarter", "Precip_Coldest_Quarter")
Finally, we want to plot the correlation matrix:
corrplot(cor(Corr_Present))