1 Set up

knitr::opts_chunk$set(echo = T, message = FALSE)

1.1 1) Load packages

library(Rcpp)

library(readxl)
library(dplyr)
library(tidyr)
library(ggplot2)
library(janitor)
library(grid)
library(ggthemes)

library(extrafont)
#font_import()
loadfonts(device = "win")
windowsFonts(Times = windowsFont("TT Times New Roman"))

library(lsmeans)
library(nlme)
library(car)
library(lme4)
library(multcomp)
library(lmerTest)
library(multcompView)
library(semPlot)
library(lavaan)
library(broom)
library(broom.mixed)
library(emmeans)
library(plyr)

1.2 2) Import data

#import data
soilhealth <- read_excel("7-30-21 part 11 nrcs soil health final data.xlsx") 

#change column names
soilhealth <- soilhealth %>% 
  clean_names()
#str(soilhealth)
#View(soilhealth)
#names(soilhealth)

#convert variables to factors
soilhealth$nhorizon <- as.factor(soilhealth$nhorizon)
soilhealth$blk <- as.factor(soilhealth$blk)
soilhealth$horizon <- as.factor(soilhealth$horizon)
soilhealth$thorizon <- as.factor(soilhealth$thorizon)
soilhealth$rlanduse <- as.factor(soilhealth$rlanduse)
soilhealth$landuse <- as.factor(soilhealth$landuse)
soilhealth$prec <- as.factor(soilhealth$prec)
soilhealth$ag <- as.factor(soilhealth$ag)
soilhealth$tillage <- as.factor(soilhealth$tillage)

#convert variables to numeric
soilhealth$bdepth=as.numeric(soilhealth$bdepth)
soilhealth$precip <- as.numeric(soilhealth$precip)
soilhealth$t_np <- as.numeric(soilhealth$t_np)
soilhealth$to_cp <- as.numeric(soilhealth$to_cp)
soilhealth$ca <- as.numeric(soilhealth$ca)
soilhealth$cu <- as.numeric(soilhealth$cu)
soilhealth$mg <- as.numeric(soilhealth$mg)
soilhealth$mn <- as.numeric(soilhealth$mn)
soilhealth$na <- as.numeric(soilhealth$na)
soilhealth$p <- as.numeric(soilhealth$p)
soilhealth$p_h <- as.numeric(soilhealth$p_h)
soilhealth$k <- as.numeric(soilhealth$k)
soilhealth$zn <- as.numeric(soilhealth$zn)
soilhealth$fe <- as.numeric(soilhealth$fe)
soilhealth$cec <- as.numeric(soilhealth$cec)
soilhealth$mb <- as.numeric(soilhealth$mb)
soilhealth$gramp <- as.numeric(soilhealth$gramp)
soilhealth$gramn <- as.numeric(soilhealth$gramn)
soilhealth$actin <- as.numeric(soilhealth$actin)
soilhealth$amf <- as.numeric(soilhealth$amf)
soilhealth$fungi <- as.numeric(soilhealth$fungi)
soilhealth$fb <- as.numeric(soilhealth$fb)
soilhealth$pgrmp <- as.numeric(soilhealth$pgrmp)
soilhealth$pgrmn <- as.numeric(soilhealth$pgrmn)
soilhealth$pactin <- as.numeric(soilhealth$pactin)
soilhealth$pamf <- as.numeric(soilhealth$pamf)
soilhealth$pfungi <- as.numeric(soilhealth$pfungi)

#vartable(soilhealth)

1.3 3) Data Wrangling

# removes ottawa
soilhealth1 <- soilhealth %>%
  filter(location!="Ottawa") 

soilhealth1$landuse<- factor(soilhealth1$landuse,
                             levels = c(1,2,3),
                             labels = c("AG", "EA", "NP"))

#str(soilhealth1)

soilhealth1 <- as.data.frame(soilhealth1)

soilhealth2 <- soilhealth1
soilhealth2 <- soilhealth2[c(1,5,9,29,33,37,57,61,65,85,89,93,109,113,117,137,141,145,165,169,173,189,193,197,213,217,221),]
#soilhealth2

# keep nutrients

nut <- soilhealth1 %>%
  dplyr::filter(location!="Ottawa") %>%
  dplyr::select(location, treatment, bdepth, horizon, blk, replication, landuse, precip, clay, nh4, no3, t_np, to_cp, to_cg, t_nm, ca, cu, mg, mn, na, p, p_h, k, zn, fe, gwc, cec) %>%
  dplyr::mutate(cn=(to_cp/t_np), ca_g=(ca/1000))
#str(nut)
#summary(nut)
#vartable(nut)


# keeps aggregate data
agg <- soilhealth1 %>%
  dplyr::select(location, treatment, bdepth, horizon, blk, replication, landuse, precip, x20wsa2000, x20wsa250, x20wsa53, x20wsa20, x20mwd, x5wsa2000, x5wsa250, x5wsa53, x5wsa20, x5mwd, nagg, bd, clay)
#str(agg)
#summary(agg)
#plot(agg)
#vartable(agg)


# Keep respiration data, enzymes, proteins
# normalize the enzyme distributions

#vartable(agg)

epr <- soilhealth1 %>%
  dplyr::select(location, treatment, bdepth, horizon, blk, replication, landuse, precip, ac, glucosidase, glucosaminidase, acidphosphotase, alkphosphatase, arylsulfatase, phosphodiesterase, protein, respiration, to_cg, t_nm, mb, gramp, gramn, actin, amf, fungi, fb, pgrmp,pgrmn, pactin, pamf, pfungi) %>%
  dplyr::mutate(lnac=log(ac), lngluc=log(glucosidase), lnglucosam=log(glucosaminidase), lnacidp=log(acidphosphotase), lnalkp=log(alkphosphatase), lnary=log(arylsulfatase), lnpho=log(phosphodiesterase), lnprotein=log(protein), lngluc_glucosam= (lngluc/lnglucosam), lngluc_acidp= (lngluc/lnacidp), lngluc_alkp=(lngluc/lnalkp), lngluc_pho=(lngluc/lnpho), lngluc_ary=(lngluc/lnary))
#str(epr)
#vartable(epr)


ratios <- soilhealth1 %>%
  dplyr::select(location, treatment, bdepth, horizon, blk, landuse, precip, replication, respiration, to_cg, t_nm, protein) %>%
  dplyr::mutate(t_ng=(t_nm/1000), ptn=(protein/t_ng), rec=(respiration/to_cg))
#vartable(ratios)
#To deal with egative natural log values from enzymes, I added 1.1 to each variable.

epr2 <- soilhealth1 %>%
  dplyr::select(location, treatment, bdepth, horizon, blk, landuse, precip, replication, ac, glucosidase, glucosaminidase, acidphosphotase, alkphosphatase, arylsulfatase, phosphodiesterase, protein, respiration) %>%
  mutate(lnac=log(ac), lngluc=log(glucosidase*100), lnglucosam=log(glucosaminidase*100), lnacidp=log(acidphosphotase*100), lnalkp=log(alkphosphatase*100), lnary=log(arylsulfatase*100), lnpho=log(phosphodiesterase*100), lnprotein=log(protein), lngluc_glucosam= (lngluc/lnglucosam), lngluc_acidp= (lngluc/lnacidp), lngluc_alkp=(lngluc/lnalkp), lngluc_pho=(lngluc/lnpho), lngluc_ary=(lngluc/lnary))

#summary(epr1)

1.4 4) Depth Wrangling

#remove IR from epr, epr2

epra <- epr %>%
  filter(treatment!="IR")

epra2 <- epr2 %>%
  filter(treatment!="IR")

#depth for biological

epra5 <- epra %>%
  filter(bdepth==5)
epra10 <- epra %>%
  filter(bdepth==10)
epra15 <- epra %>%
  filter(bdepth==15)

#remove IR from nut
nutr <- nut %>%
  filter(treatment!="IR")

#depth for chemical

nut5 <- nutr %>% 
  filter(bdepth==5)
nut10<- nutr %>% 
  filter(bdepth==10)
nut15<- nutr %>% 
  filter(bdepth==15)


#remove IR from agg
aggr <- agg %>% 
  filter(treatment!="IR")

#depth for phyisical

agg5 <- aggr %>%
  filter(bdepth==5)
agg10 <- aggr %>%
  filter(bdepth==10)
agg15 <- aggr %>%
  filter(bdepth==15)

#depth for epr2 ratios
epra25 <- epra2 %>%
  filter(bdepth==5)
epra210 <- epra2 %>%
  filter(bdepth==10)
epra215 <- epra2 %>%
  filter(bdepth==15)

#depth for ratios
ratio5 <- ratios %>%
  filter(bdepth==5)
ratio10 <- ratios %>%
  filter(bdepth==10)
ratio15 <- ratios %>%
  filter(bdepth==15)

1.5 5) Theme James

library(grid)
library(ggthemes)

#fcol <- c( "AG" = "black", "EA" = "grey40", "NP" = "grey90", "IR"="blue")
#kstate purple - 512888
fcol <- c( "AG" = "#F8A350", "EA" = "#FF9933", "NP" = "#512888", "IR"="#0033FF")

pd <- position_dodge(0.1)

theme_James <- function(base_size=14, base_family="TT Times New Roman") {
  (theme_foundation(base_size=base_size, base_family=base_family)+
     theme_bw()+ 
     theme(panel.background = element_rect(colour = NA),
           plot.background = element_rect(colour = NA),
           axis.title = element_text(color="black",size=rel(1.2)),
           axis.text = element_text(color="black", size = 12),
           legend.key = element_rect(colour = NA),
           legend.spacing = unit(0, "cm"),
           legend.text = element_text(size=12),
           legend.title = element_blank(),
           panel.grid = element_blank(),
           plot.title = element_text(color="Black",size = rel(1.5),face = "bold",hjust = 0.5),
           strip.text = element_text(color="Black",size = rel(1),face="bold")
     ))
}

1.6 Comments

x <- "0-5 cm"
y <- "5-10 cm"
z <- "10-15 cm"

l <- "natural log"

#add locations
df <- data.frame (location  = c("Tribune", "Hays", "Manhattan"),
                  precip = c("472", "579", "850"))


colbio <- c( "AG" = "#ff6500", "EA" = "deepskyblue1", "NP" = "green4")

2 Correlation graph

library(ggcorrplot)

# Compute a correlation matrix

names(soilhealth)
##  [1] "sample_name"       "location"          "treatment"        
##  [4] "depth"             "replication"       "bdepth"           
##  [7] "nhorizon"          "blk"               "horizon"          
## [10] "thorizon"          "rlanduse"          "landuse"          
## [13] "elevation"         "clay"              "temp"             
## [16] "precip"            "prec"              "ag"               
## [19] "tillage"           "nh4"               "no3"              
## [22] "t_np"              "t_nm"              "to_cp"            
## [25] "to_cg"             "ca"                "cu"               
## [28] "mg"                "mn"                "na"               
## [31] "p"                 "p_h"               "carbonate"        
## [34] "k"                 "zn"                "fe"               
## [37] "cec"               "gwc"               "odad"             
## [40] "bd"                "ac"                "x20wsa2000"       
## [43] "x20wsa250"         "x20wsa53"          "x20wsa20"         
## [46] "x20mwd"            "x5wsa2000"         "x5wsa250"         
## [49] "x5wsa53"           "x5wsa20"           "x5mwd"            
## [52] "nagg"              "respiration"       "mb"               
## [55] "gramp"             "gramn"             "actin"            
## [58] "amf"               "fungi"             "fb"               
## [61] "glucosidase"       "glucosaminidase"   "acidphosphotase"  
## [64] "alkphosphatase"    "arylsulfatase"     "phosphodiesterase"
## [67] "protein"           "socstock"          "tnstock"          
## [70] "pgrmp"             "pgrmn"             "pactin"           
## [73] "pamf"              "pfungi"
soilmatrixtop3 <- soilhealth %>%
  filter(location!="Ottawa", treatment!="IR", bdepth==c("5", "10", "15")) %>% 
  dplyr::select(t_np, to_cp, p, x20mwd, respiration, mb, gramp, gramn, actin, amf, fungi, fb, glucosidase, glucosaminidase, acidphosphotase, alkphosphatase, arylsulfatase, phosphodiesterase, protein, ac, p_h, bd) %>%
  dplyr::select(where(is.numeric)) %>% drop_na()
## Warning in bdepth == c("5", "10", "15"): longer object length is not a multiple
## of shorter object length
soilmatrixtop3 <- na.omit(soilmatrixtop3)

names(soilmatrixtop3)
##  [1] "t_np"              "to_cp"             "p"                
##  [4] "x20mwd"            "respiration"       "mb"               
##  [7] "gramp"             "gramn"             "actin"            
## [10] "amf"               "fungi"             "fb"               
## [13] "glucosidase"       "glucosaminidase"   "acidphosphotase"  
## [16] "alkphosphatase"    "arylsulfatase"     "phosphodiesterase"
## [19] "protein"           "ac"                "p_h"              
## [22] "bd"
colnames(soilmatrixtop3)[1] <- "TN"
colnames(soilmatrixtop3)[2] <- "SOC"
colnames(soilmatrixtop3)[3] <- "P"
colnames(soilmatrixtop3)[4] <- "MWD"
colnames(soilmatrixtop3)[5] <- "Resp"
colnames(soilmatrixtop3)[6] <- "MB"
colnames(soilmatrixtop3)[7] <- "GmP"
colnames(soilmatrixtop3)[8] <- "GmN"
colnames(soilmatrixtop3)[9] <- "Act"
colnames(soilmatrixtop3)[10] <- "AMF"
colnames(soilmatrixtop3)[11] <- "FUN"
colnames(soilmatrixtop3)[12] <- "F:B"
colnames(soilmatrixtop3)[13] <- "bG"
colnames(soilmatrixtop3)[14] <- "NAG"
colnames(soilmatrixtop3)[15] <- "AP"
colnames(soilmatrixtop3)[16] <- "ALK"
colnames(soilmatrixtop3)[17] <- "ARY"
colnames(soilmatrixtop3)[18] <- "PHO"
colnames(soilmatrixtop3)[19] <- "Pro"
colnames(soilmatrixtop3)[20] <- "POXC"
colnames(soilmatrixtop3)[21] <- "pH"
colnames(soilmatrixtop3)[22] <- "bd"

corr <- round(cor(soilmatrixtop3, method = "pearson"), 2)

#head(corr[,])

# Compute a matrix of correlation p-values
p.mat <- cor_pmat(soilmatrixtop3 , conf.level = 0.95)

ggcorrplot(corr, hc.order = TRUE, type = "lower", p.mat=p.mat, outline.col = "white", insig = "blank", lab=TRUE, lab_size = 2)

corpsoil <- ggcorrplot(corr, hc.order = TRUE, type = "lower", p.mat=p.mat, outline.col = "white", insig = "blank", lab=TRUE, lab_size = 2, title = "Spearman Correlation Matrix p > 0.05") 

ggsave("corplot.png", corpsoil, width=15, height=10)

ggcorrplot(corr, sig.level = 0.05, method = "circle", hc.order = F, outline.color = "white", 
           type = "lower", lab = T, lab_size = 3, colors = c("tomato2", "white", "springgreen3"), 
           p.mat = p.mat, insig = "blank", ggtheme = theme_bw) + theme(panel.grid = element_blank(), 
                                                                       legend.position = c(0.1, 0.8), axis.text = element_text(face = "bold"))
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.

ggcorrplot(corr, sig.level = 0.05, hc.order = F, type = "lower", lab=T, lab_size= 3,   colors = c("tomato2", "white", "springgreen3"), p.mat=p.mat, outline.col = "white", insig = "blank") + theme(panel.grid = element_blank(),
                                                                                                                                                                                                    legend.position = c(0.1, 0.8), axis.text = element_text(face = "bold"))

corsoil <- ggcorrplot(corr, tl.cex = 20, sig.level = 0.05, hc.order = F, type = "lower", lab=T, lab_size= 4.5,   colors = c("tomato2", "white", "springgreen3"), p.mat=p.mat, outline.col = "white", insig = "blank") + theme(panel.grid = element_blank(),
                                                                                                                                                                                                                              legend.position = c(0.1, 0.8), axis.text = element_text(face = "bold"))

ggsave("corsoilplottop.png", corsoil, width=10, height=10)

3 Biological Graphs

3.1 B-Glucosidase

3.1.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
bgluc5 <- lmer(glucosidase ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(bgluc5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        2919.0 1459.50     2    27 29.2361 1.753e-07 ***
## precip         2990.0 1495.00     2    27 29.9472 1.403e-07 ***
## landuse:precip 1979.9  494.98     4    27  9.9152 4.539e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
bgluc5_means <- lsmeans (bgluc5, ~landuse*precip, adjust="tukey")
bgluc5_pwc <- cld(bgluc5_means, adjust="none", Letters = letters, reversed=T)
bgluc5_pwc <- as.data.frame(bgluc5_pwc)

#Determining the real SE
real_se_bgluc5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise(
    n = n(),
    mean = mean(glucosidase),
    sd = sd(glucosidase)
  ) %>%
  dplyr::mutate(se = sd / sqrt(n))

real_se_bgluc5 <- merge(df, real_se_bgluc5, by = c("precip"))
bg5 <- merge(bgluc5_pwc, real_se_bgluc5, by = c("precip", "landuse"))
bg5 <- as.data.frame(bg5)
bg5$location_f = factor(bg5$location, levels = c('Tribune', 'Hays', 'Manhattan'))

ggplot(data = bg5, aes(x = landuse, y = lsmean, fill = landuse)) +
  geom_bar(position = position_dodge(),
           stat = "identity",
           colour = "black") +
  geom_errorbar(aes(ymin = lsmean - se, ymax = lsmean + se),
                width = .2,
                # Width of the error bars
                position = position_dodge(.9)) +
  scale_y_continuous(limits = c(0, 70)) +
  xlab("") +
  ggtitle("A) 0-5 cm") + 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(beta~-Glucosidase ~(mg ~kg^{-1} ~hr^{-1})))+
  geom_label(aes(label=trimws(.group), y = lsmean+se +2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgluc5.png",  height = 5, width = 4)

3.1.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
bgluc10 <- lmer(glucosidase ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(bgluc10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value Pr(>F)
## landuse        163.01  81.507     2 19.4401  2.3367 0.1232
## precip         117.35  58.674     2  8.0207  1.6821 0.2454
## landuse:precip 219.61  54.903     4 15.4087  1.5740 0.2310
bgluc10_means <- lsmeans (bgluc10, ~landuse*precip, adjust="tukey")
bgluc10_pwc <- cld(bgluc10_means, adjust="none", Letters = letters, reversed=T)
bgluc10_pwc <- as.data.frame(bgluc10_pwc)

#Determining the real SE
real_se_bgluc10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise(
    n = n(),
    mean = mean(glucosidase),
    sd = sd(glucosidase)
  ) %>%
  dplyr::mutate(se = sd / sqrt(n))

real_se_bgluc10 <- merge(df, real_se_bgluc10, by = c("precip"))
bg10 <- merge(bgluc10_pwc, real_se_bgluc10, by = c("precip", "landuse"))
bg10 <- as.data.frame(bg10)
bg10$location_f = factor(bg10$location, levels = c('Tribune', 'Hays', 'Manhattan'))


ggplot(data=bg10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  ggtitle("B) 5-10 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(beta~-Glucosidase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se +2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgluc10.png",  height=5, width=4)

3.1.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
bgluc15 <- lmer(glucosidase ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(bgluc15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        165.906  82.953     2    27 13.9815 6.799e-05 ***
## precip         214.256 107.128     2    27 18.0562 1.052e-05 ***
## landuse:precip  88.463  22.116     4    27  3.7275   0.01534 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
bgluc15_means <- lsmeans (bgluc15, ~landuse*precip, adjust="tukey")
bgluc15_pwc <- cld(bgluc15_means, adjust="none", Letters = letters, reversed=T)
bgluc15_pwc <- as.data.frame(bgluc15_pwc)

#Determining the real SE
real_se_bgluc15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(glucosidase),
    sd=sd(glucosidase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))


real_se_bgluc15<- merge(df, real_se_bgluc15, by=c("precip"))
bg15 <- merge(bgluc15_pwc, real_se_bgluc15, by=c("precip", "landuse"))
bg15 <- as.data.frame(bg15)
bg15$location_f =factor(bg15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=bg15, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(beta~-Glucosidase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se +2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgluc15.png",  height=5, width=4)

3.2 Glucosaminidase

3.2.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
glucsam5 <- lmer(glucosaminidase ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(glucsam5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        1021.33  510.66     2 19.493 67.2371 1.786e-09 ***
## precip           61.41   30.71     2  6.888  4.0429   0.06895 .  
## landuse:precip   96.68   24.17     4 19.493  3.1823   0.03617 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
glucsam5_means_int <- lsmeans (glucsam5, ~landuse*precip, adjust="tukey")
glucsam5_pwc_int <- cld(glucsam5_means_int, adjust="none", Letters = letters, reversed=T)
glucsam5_pwc_int <- as.data.frame(glucsam5_pwc_int)

#Determining the real SE
real_se_glucsam5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(glucosaminidase),
    sd=sd(glucosaminidase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_glucsam5<- merge(df, real_se_glucsam5, by=c("precip"))
glucsam5_pwc_tp_5 <- merge(glucsam5_pwc_int, real_se_glucsam5, by=c("precip", "landuse"))
glucsam5_pwc_tp_5 <- as.data.frame(glucsam5_pwc_tp_5)
glucsam5_pwc_tp_5$location_f =factor(glucsam5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=glucsam5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,35)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(beta~-Glucosaminidase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+3),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bglucsam5.png",  height=5, width=4)

3.2.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
glucsam10 <- lmer(glucosaminidase ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit) 
anova(glucsam10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value   Pr(>F)    
## landuse        316.19 158.094     2 19.0440 72.1280  1.3e-09 ***
## precip           0.05   0.025     2  9.1102  0.0114 0.988725    
## landuse:precip  69.00  17.250     4 15.9060  7.8700 0.001066 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
glucsam10_means_tp <- lsmeans(glucsam10, ~landuse*precip, adjust="tukey")
glucsam10_pwc_tp <- cld(glucsam10_means_tp, adjust = "none", Letters = letters, reversed = T)
glucsam10_pwc_tp <- as.data.frame(glucsam10_pwc_tp)

#Determining the real SE
real_se_glucsam10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(glucosaminidase),
    sd=sd(glucosaminidase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_glucsam10 <- merge(df, real_se_glucsam10, by=c("precip")) 
glucsam10_pwc_tp_10 <- merge(glucsam10_pwc_tp, real_se_glucsam10, by=c("precip", "landuse"))
glucsam10_pwc_tp_10 <- as.data.frame(glucsam10_pwc_tp_10)
glucsam10_pwc_tp_10$location_f =factor(glucsam10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=glucsam10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,35)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(beta~-Glucosaminidase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+3),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bglucsam10.png",  height=5, width=4)

3.2.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
glucsam15 <- lmer(glucosaminidase ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit) 
anova(glucsam15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF  F value    Pr(>F)    
## landuse        265.143 132.571     2    27 127.5786 1.745e-14 ***
## precip          10.113   5.057     2    27   4.8662 0.0156764 *  
## landuse:precip  36.310   9.078     4    27   8.7357 0.0001166 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
glucsam15_means_tp <- lsmeans(glucsam15, ~landuse*precip, adjust="tukey")
glucsam15_pwc_tp <- cld(glucsam15_means_tp, adjust = "none", Letters = letters, reversed = T)
glucsam15_pwc_tp <- as.data.frame(glucsam15_pwc_tp)

#Determining the real SE
real_se_glucsam15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(glucosaminidase),
    sd=sd(glucosaminidase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_glucsam15 <- merge(df, real_se_glucsam15, by=c("precip")) 
glucsam15_pwc_tp_15 <- merge(glucsam15_pwc_tp, real_se_glucsam15, by=c("precip", "landuse"))
glucsam15_pwc_tp_15 <- as.data.frame(glucsam15_pwc_tp_15)
glucsam15_pwc_tp_15$location_f =factor(glucsam15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=glucsam15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,35)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(beta~-Glucosaminidase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+3),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bglucsam15.png",  height=5, width=4)

3.3 Acid Phosphatase

3.3.1 0-5 cm

x 
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
acpho5 <- lmer(acidphosphotase ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(acpho5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        265172  132586     2 20.2421 355.867 < 2.2e-16 ***
## precip          32076   16038     2  8.2925  43.047 4.175e-05 ***
## landuse:precip  39710    9927     4 20.2421  26.646 8.166e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
acpho5_means_tp <- lsmeans(acpho5, ~landuse*precip, adjust="tukey")
acpho5_pwc_tp <- cld(acpho5_means_tp, adjust = "none", Letters = letters, reversed = T)
acpho5_pwc_tp <- as.data.frame(acpho5_pwc_tp)

#Determining the real SE
real_se_acpho5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(acidphosphotase),
    sd=sd(acidphosphotase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_acpho5 <- merge(df, real_se_acpho5, by=c("precip")) 
acpho5_pwc <- merge(acpho5_pwc_tp, real_se_acpho5, by=c("precip", "landuse"))
acpho5_pwc <- as.data.frame(acpho5_pwc)
acpho5_pwc$location_f =factor(acpho5_pwc$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=acpho5_pwc, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,400)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Acid~ Phosphatase ~(mg ~kg^{-1} ~hr^{-1})))+
  geom_label(aes(label=trimws(.group), y = lsmean+35),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3acidphos5.png",  height=5, width=4)

3.3.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
acpho10 <- lmer(acidphosphotase ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(acpho10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         85297   42649     2    27 97.4347 4.478e-13 ***
## precip           7908    3954     2    27  9.0333 0.0009917 ***
## landuse:precip  13316    3329     4    27  7.6056 0.0003070 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
acpho10_means_tp <- lsmeans(acpho10, ~landuse*precip, adjust="tukey")
acpho10_pwc_tp <- cld(acpho10_means_tp, adjust = "none", Letters = letters, reversed = T)
acpho10_pwc_tp <- as.data.frame(acpho10_pwc_tp)

#Determining the real SE
real_se_acpho10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(acidphosphotase),
    sd=sd(acidphosphotase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_acpho10 <- merge(df, real_se_acpho10, by=c("precip")) 
acpho10_pwc <- merge(acpho10_pwc_tp, real_se_acpho10, by=c("precip", "landuse"))
acpho10_pwc <- as.data.frame(acpho10_pwc)
acpho10_pwc$location_f =factor(acpho10_pwc$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=acpho10_pwc, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,400)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Acid~ Phosphatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+35),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3acidphos10.png",  height=5, width=4)

3.3.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
acpho15 <- lmer(acidphosphotase ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(acpho15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         33885 16942.6     2    27 59.8329 1.197e-10 ***
## precip           9346  4673.0     2    27 16.5026 2.079e-05 ***
## landuse:precip   7491  1872.6     4    27  6.6132 0.0007607 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
acpho15_means_tp <- lsmeans(acpho15, ~landuse*precip, adjust="tukey")
acpho15_pwc_tp <- cld(acpho15_means_tp, adjust = "none", Letters = letters, reversed = T)
acpho15_pwc_tp <- as.data.frame(acpho15_pwc_tp)

#Determining the real SE
real_se_acpho15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(acidphosphotase),
    sd=sd(acidphosphotase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_acpho15 <- merge(df, real_se_acpho15, by=c("precip")) 
acpho15_pwc <- merge(acpho15_pwc_tp, real_se_acpho15, by=c("precip", "landuse"))
acpho15_pwc <- as.data.frame(acpho15_pwc)
acpho15_pwc$location_f =factor(acpho15_pwc$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=acpho15_pwc, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,400)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Acid~ Phosphatase ~(mg ~kg^{-1} ~hr^{-1})))+
  geom_label(aes(label=trimws(.group), y = lsmean+35),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3acidphos15.png",  height=5, width=4)

3.4 Alkaline Phosphatase

3.4.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
akpho5 <- lmer(alkphosphatase ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(akpho5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF  F value    Pr(>F)    
## landuse        26411.8 13205.9     2 21.808 128.5598 8.521e-13 ***
## precip          1347.3   673.7     2 10.606   6.5582     0.014 *  
## landuse:precip  4519.6  1129.9     4 21.808  10.9997 4.880e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
akpho5_means_tp <- lsmeans(akpho5, ~landuse*precip, adjust="tukey")
akpho5_pwc_tp <- cld(akpho5_means_tp, adjust = "none", Letters = letters, reversed = T)
akpho5_pwc_tp <- as.data.frame(akpho5_pwc_tp)

#Determining the real SE
real_se_akpho5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(alkphosphatase),
    sd=sd(alkphosphatase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_akpho5<- merge(df, real_se_akpho5, by=c("precip")) 
akpho5_pwc_tp_5 <- merge(akpho5_pwc_tp, real_se_akpho5, by=c("precip", "landuse"))
akpho5_pwc_tp_5 <- as.data.frame(akpho5_pwc_tp_5)
akpho5_pwc_tp_5$location_f =factor(akpho5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=akpho5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,120)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Alkaline~ Phosphatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3alkphos5.png",  height=5, width=4)

3.4.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
akpho10 <- lmer(alkphosphatase ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(akpho10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        5806.7 2903.36     2    27 48.8669 1.066e-09 ***
## precip          697.6  348.80     2    27  5.8708  0.007639 ** 
## landuse:precip 3257.7  814.43     4    27 13.7078 3.170e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
akpho10_means_tp <- lsmeans(akpho10, ~landuse*precip, adjust="tukey")
akpho10_pwc_tp <- cld(akpho10_means_tp, adjust = "none", Letters = letters, reversed = T)
akpho10_pwc_tp <- as.data.frame(akpho10_pwc_tp)

#Determining the real SE
real_se_akpho10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(alkphosphatase),
    sd=sd(alkphosphatase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_akpho10<- merge(df, real_se_akpho10, by=c("precip")) 
akpho10_pwc_tp_10 <- merge(akpho10_pwc_tp, real_se_akpho10, by=c("precip", "landuse"))
akpho10_pwc_tp_10 <- as.data.frame(akpho10_pwc_tp_10)
akpho10_pwc_tp_10$location_f =factor(akpho10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=akpho10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,120)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Alkaline~ Phosphatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3alkphos10.png",  height=5, width=4)

3.5 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
akpho15 <- lmer(alkphosphatase ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(akpho15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        2738.95 1369.48     2    27 16.6134 1.978e-05 ***
## precip          433.98  216.99     2    27  2.6323 0.0902803 .  
## landuse:precip 2446.00  611.50     4    27  7.4182 0.0003628 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
akpho15_means_tp <- lsmeans(akpho15, ~landuse*precip, adjust="tukey")
akpho15_pwc_tp <- cld(akpho15_means_tp, adjust = "none", Letters = letters, reversed = T)
akpho15_pwc_tp <- as.data.frame(akpho15_pwc_tp)

#Determining the real SE
real_se_akpho15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(alkphosphatase),
    sd=sd(alkphosphatase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_akpho15<- merge(df, real_se_akpho15, by=c("precip")) 
akpho15_pwc_tp_15 <- merge(akpho15_pwc_tp, real_se_akpho15, by=c("precip", "landuse"))
akpho15_pwc_tp_15 <- as.data.frame(akpho15_pwc_tp_15)
akpho15_pwc_tp_15$location_f =factor(akpho15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=akpho15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,120)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Alkaline~ Phosphatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3alkphos15.png",  height=5, width=4)

3.6 Arylsulfatase

3.6.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
ary5 <- lmer(arylsulfatase ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(ary5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF  F value    Pr(>F)    
## landuse        15832.6  7916.3     2 21.560 1021.497 < 2.2e-16 ***
## precip           252.5   126.2     2 10.372   16.289 0.0006306 ***
## landuse:precip   705.4   176.4     4 21.560   22.757 1.774e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ary5_means_tp <- lsmeans(ary5, ~landuse*precip, adjust="tukey")
ary5_pwc_tp <- cld(ary5_means_tp, adjust = "none", Letters = letters, reversed = T)
ary5_pwc_tp <- as.data.frame(ary5_pwc_tp)

#Determining the real SE
real_se_ary5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(arylsulfatase),
    sd=sd(arylsulfatase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ary5 <- merge(df, real_se_ary5, by=c("precip")) 
ary5_pwc_tp_5 <- merge(ary5_pwc_tp, real_se_ary5, by=c("precip", "landuse"))
ary5_pwc_tp_5 <- as.data.frame(ary5_pwc_tp_5)
ary5_pwc_tp_5$location_f =factor(ary5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ary5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Arylsulfatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+4),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ary5.png",  height=5, width=4)

3.6.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
ary10 <- lmer(arylsulfatase ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(ary10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        5991.2 2995.61     2 22.867 480.154 < 2.2e-16 ***
## precip          674.0  336.98     2 16.466  54.013 5.846e-08 ***
## landuse:precip  642.1  160.52     4 21.095  25.729 7.502e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ary10_means_tp <- lsmeans(ary10, ~landuse*precip, adjust="tukey")
ary10_pwc_tp <- cld(ary10_means_tp, adjust = "none", Letters = letters, reversed = T)
ary10_pwc_tp <- as.data.frame(ary10_pwc_tp)

#Determining the real SE
real_se_ary10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(arylsulfatase),
    sd=sd(arylsulfatase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ary10<- merge(df, real_se_ary10, by=c("precip")) 
ary10_pwc_tp_10 <- merge(ary10_pwc_tp, real_se_ary10, by=c("precip", "landuse"))
ary10_pwc_tp_10 <- as.data.frame(ary10_pwc_tp_10)
ary10_pwc_tp_10$location_f =factor(ary10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ary10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Arylsulfatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+4),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ary10.png",  height=5, width=4)

3.6.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
ary15 <- lmer(arylsulfatase ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(ary15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF  F value    Pr(>F)    
## landuse        4219.7 2109.87     2 21.467 283.6221 3.663e-16 ***
## precip           65.5   32.73     2 10.466   4.3998 0.0410429 *  
## landuse:precip  220.3   55.08     4 21.467   7.4043 0.0006567 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ary15_means_tp <- lsmeans(ary15, ~landuse*precip, adjust="tukey")
ary15_pwc_tp <- cld(ary15_means_tp, adjust = "none", Letters = letters, reversed = T)
ary15_pwc_tp <- as.data.frame(ary15_pwc_tp)

#Determining the real SE
real_se_ary15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(arylsulfatase),
    sd=sd(arylsulfatase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ary15 <- merge(df, real_se_ary15, by=c("precip")) 
ary15_pwc_tp_15 <- merge(ary15_pwc_tp, real_se_ary15, by=c("precip", "landuse"))
ary15_pwc_tp_15 <- as.data.frame(ary15_pwc_tp_15)
ary15_pwc_tp_15$location_f =factor(ary15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ary15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Arylsulfatase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+4),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ary15.png",  height=5, width=4)

3.7 Phosphodiesterase

3.7.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
phos5 <- lmer(phosphodiesterase ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(phos5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF  F value    Pr(>F)    
## landuse        14835.3  7417.6     2 20.4399 359.6981 < 2.2e-16 ***
## precip          1377.0   688.5     2  8.9759  33.3867 6.963e-05 ***
## landuse:precip   307.1    76.8     4 20.4399   3.7232   0.01975 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
phos5_means_tp <- lsmeans(phos5, ~landuse*precip, adjust="tukey")
phos5_pwc_tp <- cld(phos5_means_tp, adjust = "none", Letters = letters, reversed = T)
phos5_pwc_tp <- as.data.frame(phos5_pwc_tp)

#Determining the real SE
real_se_phos5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(phosphodiesterase),
    sd=sd(phosphodiesterase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_phos5<- merge(df, real_se_phos5, by=c("precip")) 
phos5_pwc_tp_5 <- merge(phos5_pwc_tp, real_se_phos5, by=c("precip", "landuse"))
phos5_pwc_tp_5 <- as.data.frame(phos5_pwc_tp_5)
phos5_pwc_tp_5$location_f =factor(phos5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=phos5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,80)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Phosphodiesterase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+3),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3pho5.png",  height=5, width=4)

3.7.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
phos10 <- lmer(phosphodiesterase ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(phos10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        3484.2 1742.10     2 24.626 107.858 6.563e-13 ***
## precip         1652.1  826.06     2 21.224  51.144 7.640e-09 ***
## landuse:precip  766.1  191.52     4 23.732  11.858 1.953e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
phos10_means_tp <- lsmeans(phos10, ~landuse*precip, adjust="tukey")
phos10_pwc_tp <- cld(phos10_means_tp, adjust = "none", Letters = letters, reversed = T)
phos10_pwc_tp <- as.data.frame(phos10_pwc_tp)

#Determining the real SE
real_se_phos10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(phosphodiesterase),
    sd=sd(phosphodiesterase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_phos10<- merge(df, real_se_phos10, by=c("precip")) 
phos10_pwc_tp_10 <- merge(phos10_pwc_tp, real_se_phos10, by=c("precip", "landuse"))
phos10_pwc_tp_10 <- as.data.frame(phos10_pwc_tp_10)
phos10_pwc_tp_10$location_f =factor(phos10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=phos10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,80)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Phosphodiesterase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+3),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3pho10.png",  height=5, width=4)

3.7.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
phos15 <- lmer(phosphodiesterase ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(phos15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        1749.81  874.90     2    27 31.2774 9.337e-08 ***
## precip          281.36  140.68     2    27  5.0292 0.0139137 *  
## landuse:precip  874.60  218.65     4    27  7.8166 0.0002549 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
phos15_means_tp <- lsmeans(phos15, ~landuse*precip, adjust="tukey")
phos15_pwc_tp <- cld(phos15_means_tp, adjust = "none", Letters = letters, reversed = T)
phos15_pwc_tp <- as.data.frame(phos15_pwc_tp)

#Determining the real SE
real_se_phos15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(phosphodiesterase),
    sd=sd(phosphodiesterase)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_phos15 <- merge(df, real_se_phos15, by=c("precip")) 
phos15_pwc_tp_15 <- merge(phos15_pwc_tp, real_se_phos15, by=c("precip", "landuse"))
phos15_pwc_tp_15 <- as.data.frame(phos15_pwc_tp_15)
phos15_pwc_tp_15$location_f =factor(phos15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=phos15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,80)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Phosphodiesterase ~(mg ~kg^{-1} ~hr^{-1}))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+3),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3pho15.png",  height=5, width=4)

3.8 Protein

3.8.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
protein5 <- lmer(protein ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(protein5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        217.444 108.722     2 19.1466  72.152 1.215e-09 ***
## precip          44.081  22.041     2  7.0513  14.627  0.003096 ** 
## landuse:precip  90.177  22.544     4 19.1466  14.961 1.058e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
prot5_means_tp <- lsmeans(protein5, ~landuse*precip, adjust="tukey")
prot5_pwc_tp <- cld(prot5_means_tp, adjust = "none", Letters = letters, reversed = T)
prot5_pwc_tp <- as.data.frame(prot5_pwc_tp)

#Determining the real SE
real_se_prot5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(protein),
    sd=sd(protein)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_prot5 <- merge(df, real_se_prot5, by=c("precip")) 
prot5_pwc_tp_5 <- merge(prot5_pwc_tp, real_se_prot5, by=c("precip", "landuse"))
prot5_pwc_tp_5 <- as.data.frame(prot5_pwc_tp_5)
prot5_pwc_tp_5$location_f =factor(prot5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=prot5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Protein ~Content ~(g~protein ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3protein5.png",  height=5, width=4)

3.8.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
protein10 <- lmer(protein ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(protein10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        28.6485 14.3242     2 21.0171 22.3799 6.209e-06 ***
## precip          8.0651  4.0325     2  9.6116  6.3003   0.01785 *  
## landuse:precip 11.6571  2.9143     4 17.1425  4.5532   0.01094 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
prot10_means_tp <- lsmeans(protein10, ~landuse*precip, adjust="tukey")
prot10_pwc_tp <- cld(prot10_means_tp, adjust = "none", Letters = letters, reversed = T)
prot10_pwc_tp <- as.data.frame(prot10_pwc_tp)

#Determining the real SE
real_se_prot10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(protein),
    sd=sd(protein)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_prot10 <- merge(df, real_se_prot10, by=c("precip")) 
prot10_pwc_tp_10 <- merge(prot10_pwc_tp, real_se_prot10, by=c("precip", "landuse"))
prot10_pwc_tp_10 <- as.data.frame(prot10_pwc_tp_10)
prot10_pwc_tp_10$location_f =factor(prot10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=prot10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Protein ~Content ~(g~protein ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3protein10.png",  height=5, width=4)

3.8.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
protein15 <- lmer(protein ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(protein15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        28.8113 14.4056     2 18.3233 33.9912 6.821e-07 ***
## precip          0.2179  0.1090     2  6.4544  0.2571    0.7809    
## landuse:precip  1.2661  0.3165     4 18.3233  0.7469    0.5725    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
prot15_means_tp <- lsmeans(protein15, ~landuse*precip, adjust="tukey")
prot15_pwc_tp <- cld(prot15_means_tp, adjust = "none", Letters = letters, reversed = T)
prot15_pwc_tp <- as.data.frame(prot15_pwc_tp)

#Determining the real SE
real_se_prot15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(protein),
    sd=sd(protein)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_prot15 <- merge(df, real_se_prot15, by=c("precip")) 
prot15_pwc_tp_15 <- merge(prot15_pwc_tp, real_se_prot15, by=c("precip", "landuse"))
prot15_pwc_tp_15 <- as.data.frame(prot15_pwc_tp_15)
prot15_pwc_tp_15$location_f =factor(prot15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=prot15_pwc_tp_15, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  xlab("")+
  ggtitle("C) 10-15 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Protein ~Content ~(g~protein ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3protein15.png",  height=5, width=4)

3.9 Permanganate Oxidizable Organic Carbon

3.9.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
ac5 <- lmer(ac ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(ac5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         11652  5825.9     2    27  14.275 5.891e-05 ***
## precip          34811 17405.3     2    27  42.648 4.401e-09 ***
## landuse:precip  39551  9887.7     4    27  24.228 1.347e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ac5_means_tp <- lsmeans(ac5, ~landuse*precip, adjust="tukey")
ac5_pwc_tp <- cld(ac5_means_tp, adjust = "none", Letters = letters, reversed = T)
ac5_pwc_tp <- as.data.frame(ac5_pwc_tp)

#Determining the real SE
real_se_ac5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ac),
    sd=sd(ac)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ac5<- merge(df, real_se_ac5, by=c("precip")) 
ac5_pwc_tp_5 <- merge(ac5_pwc_tp, real_se_ac5, by=c("precip", "landuse"))
ac5_pwc_tp_5 <- as.data.frame(ac5_pwc_tp_5)
ac5_pwc_tp_5$location_f =factor(ac5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ac5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1700)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.2)) +
  ylab(expression(Active ~Carbon~(mg ~Oxidizable ~C ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+100),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ac5.png",  height=5, width=4)

3.9.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
ac10 <- lmer(ac ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(ac10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         14172    7086     2    27  32.198 7.094e-08 ***
## precip          40129   20065     2    27  91.171 9.814e-13 ***
## landuse:precip  64376   16094     4    27  73.129 4.350e-14 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ac10_means_tp <- lsmeans(ac10, ~landuse*precip, adjust="tukey")
ac10_pwc_tp <- cld(ac10_means_tp, adjust = "none", Letters = letters, reversed = T)
ac10_pwc_tp <- as.data.frame(ac10_pwc_tp)

#Determining the real SE
real_se_ac10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ac),
    sd=sd(ac)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ac10 <- merge(df, real_se_ac10, by=c("precip")) 
ac10_pwc_tp_10 <- merge(ac10_pwc_tp, real_se_ac10, by=c("precip", "landuse"))
ac10_pwc_tp_10 <- as.data.frame(ac10_pwc_tp_10)
ac10_pwc_tp_10$location_f =factor(ac10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ac10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1700)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.2)) +
  ylab(expression(Active ~Carbon~(mg ~Oxidizable ~C ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+100),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ac10.png",  height=5, width=4)

3.9.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
ac15 <- lmer(ac ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(ac15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse         19507  9753.3     2 21.532  68.081 4.901e-10 ***
## precip          56085 28042.4     2 10.929 195.744 2.769e-09 ***
## landuse:precip  44618 11154.5     4 21.532  77.862 1.736e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ac15_means_tp <- lsmeans(ac15, ~landuse*precip, adjust="tukey")
ac15_pwc_tp <- cld(ac15_means_tp, adjust = "none", Letters = letters, reversed = T)
ac15_pwc_tp <- as.data.frame(ac15_pwc_tp)

#Determining the rea
real_se_ac15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ac),
    sd=sd(ac)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ac15 <- merge(df, real_se_ac15, by=c("precip")) 
ac15_pwc_tp_15 <- merge(ac15_pwc_tp, real_se_ac15, by=c("precip","landuse"))
ac15_pwc_tp_15 <- as.data.frame(ac15_pwc_tp_15)
ac15_pwc_tp_15$location_f =factor(ac15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ac15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1700)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.2)) +
  ylab(expression(Active ~Carbon~(mg ~Oxidizable ~C ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+100),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ac15.png",  height=5, width=4)

3.10 Soil Respiration

3.10.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
respiration5 <- lmer(respiration ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(respiration5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        57.712 28.8558     2 22.596  31.407 2.990e-07 ***
## precip         44.808 22.4038     2 12.325  24.385 5.196e-05 ***
## landuse:precip 38.296  9.5739     4 22.596  10.420 6.178e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
respiration5_means_tp <- lsmeans(respiration5, ~landuse*precip, adjust="tukey")
respiration5_pwc_tp <- cld(respiration5_means_tp, adjust = "none", Letters = letters, reversed = T)
respiration5_pwc_tp <- as.data.frame(respiration5_pwc_tp)

#Determining the real SE
real_se_respiration5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(respiration),
    sd=sd(respiration)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_respiration5<- merge(df, real_se_respiration5, by=c("precip")) 
respiration5_pwc_tp_5 <- merge(respiration5_pwc_tp, real_se_respiration5, by=c("precip", "landuse"))
respiration5_pwc_tp_5 <- as.data.frame(respiration5_pwc_tp_5)
respiration5_pwc_tp_5$location_f =factor(respiration5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))


ggplot(data=respiration5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,10)) +  
  xlab("")+     
  ggtitle("A) 0-5 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(~Respiration ~(mg ~CO[2]~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3respiration5.png",  height=5, width=4)

3.10.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
respiration10 <- lmer(respiration ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(respiration10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        11.8739  5.9369     2 24.564  42.896 9.682e-09 ***
## precip         12.2047  6.1023     2 23.306  44.091 1.199e-08 ***
## landuse:precip  7.5323  1.8831     4 24.093  13.606 6.169e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
resp10_means_tp <- lsmeans(respiration10, ~landuse*precip, adjust="tukey")
resp10_pwc_tp <- cld(resp10_means_tp, adjust = "none", Letters = letters, reversed = T)
resp10_pwc_tp <- as.data.frame(resp10_pwc_tp)

#Determining the real SE
real_se_resp10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(respiration),
    sd=sd(respiration)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_resp10 <- merge(df, real_se_resp10, by=c("precip")) 
resp10_pwc_tp_10 <- merge(resp10_pwc_tp, real_se_resp10, by=c("precip", "landuse"))
resp10_pwc_tp_10 <- as.data.frame(resp10_pwc_tp_10)
resp10_pwc_tp_10$location_f =factor(resp10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=resp10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,10)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(~Respiration ~(mg ~CO[2]~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3respiration10.png",  height=5, width=4)

3.10.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
respiration15 <- lmer(respiration ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(respiration15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        9.2111  4.6055     2    27  75.650 8.567e-12 ***
## precip         7.8223  3.9112     2    27  64.244 5.438e-11 ***
## landuse:precip 7.4452  1.8613     4    27  30.574 1.135e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
resp15_means_tp <- lsmeans(respiration15, ~landuse*precip, adjust="tukey")
resp15_pwc_tp <- cld(resp15_means_tp, adjust = "none", Letters = letters, reversed = T)
resp15_pwc_tp <- as.data.frame(resp15_pwc_tp)

#Determining the real SE
real_se_resp15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(respiration),
    sd=sd(respiration)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_resp15 <- merge(df, real_se_resp15, by=c("precip")) 
resp15_pwc_tp_15 <- merge(resp15_pwc_tp, real_se_resp15, by=c("precip", "landuse"))
resp15_pwc_tp_15 <- as.data.frame(resp15_pwc_tp_15)
resp15_pwc_tp_15$location_f =factor(resp15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=resp15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,10)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(~Respiration ~(mg ~CO[2]~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3respiration15.png",  height=5, width=4)

3.11 Microbial Biomass

3.11.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
mb5 <- lmer(mb ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(mb5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        20569.9 10285.0     2 18.5851 98.9978  1.23e-10 ***
## precip          2016.9  1008.4     2  7.6531  9.7066 0.0079577 ** 
## landuse:precip  3417.3   854.3     4 18.5620  8.2234 0.0005386 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mb5_means_tp <- lsmeans(mb5, ~landuse*precip, adjust="tukey")
mb5_pwc_tp <- cld(mb5_means_tp, adjust = "none", Letters = letters, reversed = T)
mb5_pwc_tp <- as.data.frame(mb5_pwc_tp)

#Determining the real SE
real_se_mb5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mb),
    sd=sd(mb)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mb5 <- merge(df, real_se_mb5, by=c("precip")) 
mb5_pwc_tp_5 <- merge(mb5_pwc_tp, real_se_mb5, by=c("precip", "landuse"))
mb5_pwc_tp_5 <- as.data.frame(mb5_pwc_tp_5)
mb5_pwc_tp_5$location_f =factor(mb5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mb5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,135)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Microbial~ Biomass~ (nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mb5.png",  height=5, width=4)

3.11.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
mb10 <- lmer(mb ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(mb10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        8285.9  4142.9     2 14.9326 44.6757 4.987e-07 ***
## precip         1362.7   681.3     2  8.7923  7.3473  0.013306 *  
## landuse:precip 2413.4   603.4     4 14.1330  6.5063  0.003481 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mb10_means_tp <- lsmeans(mb10, ~landuse*precip, adjust="tukey")
mb10_pwc_tp <- cld(mb10_means_tp, adjust = "none", Letters = letters, reversed = T)
mb10_pwc_tp <- as.data.frame(mb10_pwc_tp)

#Determining the real SE
real_se_mb10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mb),
    sd=sd(mb)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mb10<- merge(df, real_se_mb10, by=c("precip")) 
mb10_pwc_tp_10 <- merge(mb10_pwc_tp, real_se_mb10, by=c("precip", "landuse"))
mb10_pwc_tp_10 <- as.data.frame(mb10_pwc_tp_10)
mb10_pwc_tp_10$location_f =factor(mb10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mb10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,135)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Microbial~ Biomass~ (nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mb10.png",  height=5, width=4)

3.11.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
mb15 <- lmer(mb ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(mb15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        4955.6 2477.79     2 20.6683  41.807 5.446e-08 ***
## precip         2565.5 1282.73     2  8.9024  21.643 0.0003812 ***
## landuse:precip 3014.7  753.68     4 20.6683  12.717 2.235e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mb15_means_tp <- lsmeans(mb15, ~landuse*precip, adjust="tukey")
mb15_pwc_tp <- cld(mb15_means_tp, adjust = "none", Letters = letters, reversed = T)
mb15_pwc_tp <- as.data.frame(mb15_pwc_tp)

#Determining the real SE
real_se_mb15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mb),
    sd=sd(mb)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mb15<- merge(df, real_se_mb15, by=c("precip"))
mb15_pwc_tp_15 <- merge(mb15_pwc_tp, real_se_mb15, by=c("precip", "landuse"))
mb15_pwc_tp_15 <- as.data.frame(mb15_pwc_tp_15)
mb15_pwc_tp_15$location_f =factor(mb15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mb15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,135)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Microbial~ Biomass~ (nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mb15.png",  height=5, width=4)

3.12 Gram Positive Bacteria

3.12.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
gramp5 <- lmer(gramp ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(gramp5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        1390.00  695.00     2 18.535 65.9953 3.716e-09 ***
## precip          137.74   68.87     2  7.589  6.5398  0.022331 *  
## landuse:precip  248.19   62.05     4 18.512  5.8917  0.003094 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gramp5_means_tp <- lsmeans(gramp5, ~landuse*precip, adjust="tukey")
gramp5_pwc_tp <- cld(gramp5_means_tp, adjust = "none", Letters = letters, reversed = T)
gramp5_pwc_tp <- as.data.frame(gramp5_pwc_tp)

#Determining the real SE
real_se_gramp5 <- epra5 %>%
  na.omit()%>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(gramp),
    sd=sd(gramp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_gramp5 <- merge(df, real_se_gramp5, by=c("precip")) 
gramp5_pwc_tp_5 <- merge(gramp5_pwc_tp, real_se_gramp5, by=c("precip", "landuse"))
gramp5_pwc_tp_5 <- as.data.frame(gramp5_pwc_tp_5)
gramp5_pwc_tp_5$location_f =factor(gramp5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=gramp5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
    ggtitle("A) 0-5 cm")+ 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(~Gram~("+") ~Bacteria ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3gramp0-5.png",  height=5, width=4)

3.12.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
gramp10 <- lmer(gramp ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(gramp10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        947.57  473.79     2 14.1828 65.6542 6.762e-08 ***
## precip         115.41   57.71     2  8.7816  7.9967  0.010525 *  
## landuse:precip 277.80   69.45     4 13.8634  9.6240  0.000609 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gramp10_means_tp <- lsmeans(gramp10, ~landuse*precip, adjust="tukey")
gramp10_pwc_tp <- cld(gramp10_means_tp, adjust = "none", Letters = letters, reversed = T)
gramp10_pwc_tp <- as.data.frame(gramp10_pwc_tp)

#Determining the real SE
real_se_gramp10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(gramp),
    sd=sd(gramp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_gramp10 <- merge(df, real_se_gramp10, by=c("precip"))
gramp10_pwc_tp_10 <- merge(gramp10_pwc_tp, real_se_gramp10, by=c("precip", "landuse"))
gramp10_pwc_tp_10 <- as.data.frame(gramp10_pwc_tp_10)
gramp10_pwc_tp_10$location_f =factor(gramp10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=gramp10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(~Gram~("+") ~Bacteria ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3gramp10.png",  height=5, width=4)

3.12.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
gramp15 <- lmer(gramp ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(gramp15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        890.17  445.08     2 20.1911  81.588 2.123e-10 ***
## precip         235.03  117.52     2  7.6771  21.542 0.0007098 ***
## landuse:precip 531.44  132.86     4 20.1911  24.354 1.760e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gramp15_means_tp <- lsmeans(gramp15, ~landuse*precip, adjust="tukey")
gramp15_pwc_tp <- cld(gramp15_means_tp, adjust = "none", Letters = letters, reversed = T)
gramp15_pwc_tp <- as.data.frame(gramp15_pwc_tp)

#Determining the real SE
real_se_gramp15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(gramp),
    sd=sd(gramp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_gramp15 <- merge(df, real_se_gramp15, by=c("precip")) 
gramp15_pwc_tp_15 <- merge(gramp15_pwc_tp, real_se_gramp15, by=c("precip", "landuse"))
gramp15_pwc_tp_15 <- as.data.frame(gramp15_pwc_tp_15)
gramp15_pwc_tp_15$location_f =factor(gramp15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=gramp15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(~Gram~("+") ~Bacteria ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3gramp15.png",  height=5, width=4)

3.13 Gram Negative Bacteria

3.13.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
gramn5 <- lmer(gramn ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(gramn5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        120.571  60.286     2 17.8605 62.4002 8.735e-09 ***
## precip          20.725  10.362     2  6.7766 10.7257   0.00795 ** 
## landuse:precip  14.647   3.662     4 17.8354  3.7903   0.02112 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gramn5_means_tp <- lsmeans(gramn5, ~landuse*precip, adjust="tukey")
gramn5_pwc_tp <- cld(gramn5_means_tp, adjust = "none", Letters = letters, reversed = T)
gramn5_pwc_tp <- as.data.frame(gramn5_pwc_tp)

#Determining the real SE
real_se_gramn5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit() %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(gramn),
    sd=sd(gramn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_gramn5 <- merge(df, real_se_gramn5, by=c("precip")) 
gramn5_pwc_tp_5 <- merge(gramn5_pwc_tp, real_se_gramn5, by=c("precip", "landuse"))
gramn5_pwc_tp_5 <- as.data.frame(gramn5_pwc_tp_5)
gramn5_pwc_tp_5$location_f =factor(gramn5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=gramn5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(~Gram~("-") ~Bacteria ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3gramn5.png",  height=5, width=4)

3.13.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
gramn10 <- lmer(gramn ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(gramn10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        51.857 25.9286     2 14.6677 22.1820 3.673e-05 ***
## precip          8.191  4.0955     2  8.7899  3.5037   0.07604 .  
## landuse:precip 16.143  4.0359     4 14.0384  3.4527   0.03658 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gramn10_means_tp <- lsmeans(gramn10, ~landuse*precip, adjust="tukey")
gramn10_pwc_tp <- cld(gramn10_means_tp, adjust = "none", Letters = letters, reversed = T)
gramn10_pwc_tp <- as.data.frame(gramn10_pwc_tp)

#Determining the real SE
real_se_gramn10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(gramn),
    sd=sd(gramn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_gramn10 <- merge(df, real_se_gramn10, by=c("precip")) 
gramn10_pwc_tp_10 <- merge(gramn10_pwc_tp, real_se_gramn10, by=c("precip", "landuse"))
gramn10_pwc_tp_10 <- as.data.frame(gramn10_pwc_tp_10)
gramn10_pwc_tp_10$location_f =factor(gramn10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=gramn10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(~Gram~("-") ~Bacteria ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3gramn10.png",  height=5, width=4)

3.13.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
gramn15 <- lmer(gramn ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(gramn15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        27.7142 13.8571     2 17.5098 30.6316 1.915e-06 ***
## precip          4.9768  2.4884     2  7.5285  5.5007 0.0336944 *  
## landuse:precip 14.1746  3.5436     4 17.5674  7.8333 0.0008243 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
gramn15_means_tp <- lsmeans(gramn15, ~landuse*precip, adjust="tukey")
gramn15_pwc_tp <- cld(gramn15_means_tp, adjust = "none", Letters = letters, reversed = T)
gramn15_pwc_tp <- as.data.frame(gramn15_pwc_tp)

#Determining the real SE

real_se_gramn15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit() %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(gramn),
    sd=sd(gramn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_gramn15 <- merge(df, real_se_gramn15, by=c("precip")) 
gramn15_pwc_tp_15 <- merge(gramn15_pwc_tp, real_se_gramn15, by=c("precip", "landuse"))
gramn15_pwc_tp_15 <- as.data.frame(gramn15_pwc_tp_15)
gramn15_pwc_tp_15$location_f =factor(gramn15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=gramn15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(~Gram~("-") ~Bacteria ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3gramn15.png",  height=5, width=4)

3.14 Actinomycetes

3.14.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
actin5 <- lmer(actin ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(actin5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        1.3825 0.69127     2 21.325 11.2296 0.0004664 ***
## precip         3.1010 1.55049     2 12.731 25.1874 3.756e-05 ***
## landuse:precip 1.5151 0.37877     4 21.300  6.1531 0.0018809 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
actin5_means_tp <- lsmeans(actin5, ~landuse*precip, adjust="tukey")
actin5_pwc_tp <- cld(actin5_means_tp, adjust = "none", Letters = letters, reversed = T)
actin5_pwc_tp <- as.data.frame(actin5_pwc_tp)

#Determining the real SE
real_se_actin5 <- epra5 %>%
  na.omit()%>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(actin),
    sd=sd(actin)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_actin5 <- merge(df, real_se_actin5, by=c("precip")) 
actin5_pwc_tp_5 <- merge(actin5_pwc_tp, real_se_actin5, by=c("precip", "landuse"))
actin5_pwc_tp_5 <- as.data.frame(actin5_pwc_tp_5)
actin5_pwc_tp_5$location_f =factor(actin5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=actin5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Actinomycetes ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3actin5.png",  height=5, width=4)

3.14.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
actin10 <- lmer(actin ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(actin10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        1.4104 0.70520     2    27  25.718 5.590e-07 ***
## precip         2.8343 1.41714     2    27  51.682 5.872e-10 ***
## landuse:precip 1.3386 0.33465     4    27  12.204 8.569e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
actin10_means_tp <- lsmeans(actin10, ~landuse*precip, adjust="tukey")
actin10_pwc_tp <- cld(actin10_means_tp, adjust = "none", Letters = letters, reversed = T)
actin10_pwc_tp <- as.data.frame(actin10_pwc_tp)

#Determining the real SE
real_se_actin10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(actin),
    sd=sd(actin)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_actin10 <- merge(df, real_se_actin10, by=c("precip")) 
actin10_pwc_tp_10 <- merge(actin10_pwc_tp, real_se_actin10, by=c("precip", "landuse"))
actin10_pwc_tp_10 <- as.data.frame(actin10_pwc_tp_10)
actin10_pwc_tp_10$location_f =factor(actin10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=actin10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  xlab("")+
   ggtitle("B) 5-10 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(~Actinomycetes ~(nmol ~PLFA ~g^{-1} ~soil)))+
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3actin10.png",  height=5, width=4)

3.14.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
actin15 <- lmer(actin ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(actin15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        1.0504 0.52521     2    27  20.720 3.521e-06 ***
## precip         1.6279 0.81396     2    27  32.112 7.277e-08 ***
## landuse:precip 1.8102 0.45255     4    27  17.854 2.821e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
actin15_means_tp <- lsmeans(actin15, ~landuse*precip, adjust="tukey")
actin15_pwc_tp <- cld(actin15_means_tp, adjust = "none", Letters = letters, reversed = T)
actin15_pwc_tp <- as.data.frame(actin15_pwc_tp)

#Determining the real SE
real_se_actin15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(actin),
    sd=sd(actin)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_actin15 <- merge(df, real_se_actin15, by=c("precip")) 
actin15_pwc_tp_15 <- merge(actin15_pwc_tp, real_se_actin15, by=c("precip", "landuse"))
actin15_pwc_tp_15 <- as.data.frame(actin15_pwc_tp_15)
actin15_pwc_tp_15$location_f =factor(actin15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=actin15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Actinomycetes ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3actin15.png",  height=5, width=4)

3.15 Arbuscular Mycorrhizal Fungi

3.15.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
amf5 <- lmer(amf ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(amf5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        244.28 122.142     2    25  85.559 6.573e-12 ***
## precip         320.02 160.008     2    25 112.084 3.297e-13 ***
## landuse:precip  85.27  21.318     4    25  14.933 2.319e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
amf5_means_tp <- lsmeans(amf5, ~landuse*precip, adjust="tukey")
amf5_pwc_tp <- cld(amf5_means_tp, adjust = "none", Letters = letters, reversed = T)
amf5_pwc_tp <- as.data.frame(amf5_pwc_tp)

#Determining the real SE
real_se_amf5 <- epra5 %>%
  na.omit()%>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(amf),
    sd=sd(amf)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_amf5 <- merge(df, real_se_amf5, by=c("precip")) 
amf5_pwc_tp_5 <- merge(amf5_pwc_tp, real_se_amf5, by=c("precip", "landuse"))
amf5_pwc_tp_5 <- as.data.frame(amf5_pwc_tp_5)
amf5_pwc_tp_5$location_f =factor(amf5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=amf5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,20)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Arbuscular ~Mycorrhizal ~Fungi ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3amf5.png",  height=5, width=4)

3.15.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
amf10 <- lmer(amf ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(amf10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        131.575  65.787     2    27 119.004 4.068e-14 ***
## precip         157.225  78.612     2    27 142.204 4.607e-15 ***
## landuse:precip  95.673  23.918     4    27  43.266 2.294e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
amf10_means_tp <- lsmeans(amf10, ~landuse*precip, adjust="tukey")
amf10_pwc_tp <- cld(amf10_means_tp, adjust = "none", Letters = letters, reversed = T)
amf10_pwc_tp <- as.data.frame(amf10_pwc_tp)

#Determining the real SE
real_se_amf10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(amf),
    sd=sd(amf)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_amf10 <- merge(df, real_se_amf10, by=c("precip")) 
amf10_pwc_tp_10 <- merge(amf10_pwc_tp, real_se_amf10, by=c("precip", "landuse"))
amf10_pwc_tp_10 <- as.data.frame(amf10_pwc_tp_10)
amf10_pwc_tp_10$location_f =factor(amf10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=amf10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,20)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Arbuscular ~Mycorrhizal ~Fungi ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3amf10.png",  height=5, width=4)

3.15.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
amf15 <- lmer(amf ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(amf15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        118.707  59.354     2    27  93.399 7.385e-13 ***
## precip          80.685  40.343     2    27  63.483 6.211e-11 ***
## landuse:precip  73.818  18.454     4    27  29.040 1.983e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
amf15_means_tp <- lsmeans(amf15, ~landuse*precip, adjust="tukey")
amf15_pwc_tp <- cld(amf15_means_tp, adjust = "none", Letters = letters, reversed = T)
amf15_pwc_tp <- as.data.frame(amf15_pwc_tp)

#Determining the real SE
real_se_amf15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(amf),
    sd=sd(amf)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_amf15 <- merge(df, real_se_amf15, by=c("precip")) 
amf15_pwc_tp_15 <- merge(amf15_pwc_tp, real_se_amf15, by=c("precip", "landuse"))
amf15_pwc_tp_15 <- as.data.frame(amf15_pwc_tp_15)
amf15_pwc_tp_15$location_f =factor(amf15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=amf15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,20)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Arbuscular ~Mycorrhizal ~Fungi ~(nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3amf15.png",  height=5, width=4)

3.16 Saprophytic Fungi

3.16.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
fungi5 <- lmer(fungi ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(fungi5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        13.0833  6.5416     2 15.5262 21.6886 3.196e-05 ***
## precip          3.5098  1.7549     2  5.5028  5.8183  0.043897 *  
## landuse:precip  7.4228  1.8557     4 15.3225  6.1525  0.003719 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fungi5_means_tp <- lsmeans(fungi5, ~landuse*precip, adjust="tukey")
fungi5_pwc_tp <- cld(fungi5_means_tp, adjust = "none", Letters = letters, reversed = T)
fungi5_pwc_tp <- as.data.frame(fungi5_pwc_tp)

#Determining the real SE
real_se_fungi5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fungi),
    sd=sd(fungi)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fungi5 <- merge(df, real_se_fungi5, by=c("precip")) 
fungi5_pwc_tp_5 <- merge(fungi5_pwc_tp, real_se_fungi5, by=c("precip", "landuse"))
fungi5_pwc_tp_5 <- as.data.frame(fungi5_pwc_tp_5)
fungi5_pwc_tp_5$location_f =factor(fungi5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fungi5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,5)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Saprophytic ~Fungi~ (nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fungi5.png",  height=5, width=4)

3.16.2 5-10 cm

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
fungi10 <- lmer(fungi ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(fungi10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        4.6926 2.34632     2 13.2577 30.5984 1.077e-05 ***
## precip         0.8777 0.43883     2  6.6477  5.7228   0.03586 *  
## landuse:precip 1.6742 0.41854     4 11.7489  5.4582   0.01008 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fungi10_means_tp <- lsmeans(fungi10, ~landuse*precip, adjust="tukey")
fungi10_pwc_tp <- cld(fungi10_means_tp, adjust = "none", Letters = letters, reversed = T)
fungi10_pwc_tp <- as.data.frame(fungi10_pwc_tp)

#Determining the real SE
real_se_fungi10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fungi),
    sd=sd(fungi)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fungi10 <- merge(df, real_se_fungi10, by=c("precip")) 
fungi10_pwc_tp_10 <- merge(fungi10_pwc_tp, real_se_fungi10, by=c("precip", "landuse"))
fungi10_pwc_tp_10 <- as.data.frame(fungi10_pwc_tp_10)
fungi10_pwc_tp_10$location_f =factor(fungi10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fungi10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,5)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Saprophytic ~Fungi~ (nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fungi10.png",  height=5, width=4)

3.16.3 10-15 cm

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
fungi15 <- lmer(fungi ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(fungi15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        6.0142 3.00710     2 20.1907 120.838 5.815e-12 ***
## precip         1.8528 0.92638     2  7.6639  37.226  0.000113 ***
## landuse:precip 3.4034 0.85086     4 20.1907  34.191 9.998e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fungi15_means_tp <- lsmeans(fungi15, ~landuse*precip, adjust="tukey")
fungi15_pwc_tp <- cld(fungi15_means_tp, adjust = "none", Letters = letters, reversed = T)
fungi15_pwc_tp <- as.data.frame(fungi15_pwc_tp)

#Determining the real SE
real_se_fungi15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fungi),
    sd=sd(fungi)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fungi15 <- merge(df, real_se_fungi15, by=c("precip")) 
fungi15_pwc_tp_15 <- merge(fungi15_pwc_tp, real_se_fungi15, by=c("precip", "landuse"))
fungi15_pwc_tp_15 <- as.data.frame(fungi15_pwc_tp_15)
fungi15_pwc_tp_15$location_f =factor(fungi15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fungi15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,5)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm ")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Saprophytic ~Fungi~ (nmol ~PLFA ~g^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.2),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fungi15.png",  height=5, width=4)

3.17 Fungi to Bacteria ratio

3.17.1 0-5 cm

x
## [1] "0-5 cm"
epra5$precip <- as.factor(epra5$precip)
fb5 <- lmer(fb ~ landuse*precip + (1|replication), data=epra5, na.action=na.omit)
anova(fb5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF   DenDF F value   Pr(>F)   
## landuse        0.037308 0.018654     2 17.3899  6.6136 0.007310 **
## precip         0.072335 0.036167     2  6.2649 12.8230 0.006099 **
## landuse:precip 0.025567 0.006392     4 17.3668  2.2662 0.103705   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fb5_means_tp <- lsmeans(fb5, ~landuse*precip, adjust="tukey")
fb5_pwc_tp <- cld(fb5_means_tp, adjust = "none", Letters = letters, reversed = T)
fb5_pwc_tp <- as.data.frame(fb5_pwc_tp)

#Determining the real SE
real_se_fb5 <- epra5 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fb),
    sd=sd(fb)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fb5 <- merge(df, real_se_fb5, by=c("precip")) 
fb5_pwc_tp_5 <- merge(fb5_pwc_tp, real_se_fb5, by=c("precip", "landuse"))
fb5_pwc_tp_5 <- as.data.frame(fb5_pwc_tp_5)
fb5_pwc_tp_5$location_f =factor(fb5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fb5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  labs( y="Fungi to Bacteria ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fb5.png",  height=5, width=4)

3.17.2 5-10 cm no effects

y
## [1] "5-10 cm"
epra10$precip <- as.factor(epra10$precip)
fb10 <- lmer(fb ~ landuse*precip + (1|replication), data=epra10, na.action=na.omit)
anova(fb10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq   Mean Sq NumDF   DenDF F value Pr(>F)
## landuse        0.013176 0.0065880     2 16.7961  1.1473 0.3412
## precip         0.023826 0.0119128     2  8.8916  2.0745 0.1822
## landuse:precip 0.033426 0.0083565     4 14.8765  1.4552 0.2651
fb10_means_tp <- lsmeans(fb10, ~landuse*precip, adjust="tukey")
fb10_pwc_tp <- cld(fb10_means_tp, adjust = "none", Letters = letters, reversed = T)
fb10_pwc_tp <- as.data.frame(fb10_pwc_tp)

#Determining the real SE
real_se_fb10 <- epra10 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fb),
    sd=sd(fb)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fb10 <- merge(df, real_se_fb10, by=c("precip")) 
fb10_pwc_tp_10 <- merge(fb10_pwc_tp, real_se_fb10, by=c("precip", "landuse"))
fb10_pwc_tp_10 <- as.data.frame(fb10_pwc_tp_10)
fb10_pwc_tp_10$location_f =factor(fb10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fb10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1)) +  
  xlab("")+
  ggtitle("B) 5-10 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  labs( y="Fungi to Bacteria ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fb10.png",  height=5, width=4)

3.17.3 10-15 cm P

Manhattan>Hays>Tribune

z
## [1] "10-15 cm"
epra15$precip <- as.factor(epra15$precip)
fb15 <- lmer(fb ~ landuse*precip + (1|replication), data=epra15, na.action=na.omit)
anova(fb15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        0.091051 0.045526     2 19.3841 11.4501 0.0005212 ***
## precip         0.033189 0.016594     2  7.6208  4.1736 0.0596901 .  
## landuse:precip 0.041191 0.010298     4 19.3761  2.5900 0.0690034 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fb15_means_tp <- lsmeans(fb15, ~landuse*precip, adjust="tukey")
fb15_pwc_tp <- cld(fb15_means_tp, adjust = "none", Letters = letters, reversed = T)
fb15_pwc_tp <- as.data.frame(fb15_pwc_tp)

#Determining the real SE
real_se_fb15 <- epra15 %>%
  dplyr::group_by(precip, landuse) %>%
  na.omit()%>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fb),
    sd=sd(fb)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fb15 <- merge(df, real_se_fb15, by=c("precip")) 
fb15_pwc_tp_15 <- merge(fb15_pwc_tp, real_se_fb15, by=c("precip", "landuse"))
fb15_pwc_tp_15 <- as.data.frame(fb15_pwc_tp_15)
fb15_pwc_tp_15$location_f =factor(fb15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fb15_pwc_tp_15, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  labs( y="Fungi to Bacteria ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fb15.png",  height=5, width=4)

4 Chemical

4.1 Total Nitrogen

4.1.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
t_nm5 <- lmer(t_nm ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(t_nm5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        3363.5 1681.75     2 22.061 58.5860 1.494e-09 ***
## precip          212.2  106.11     2 11.550  3.6965  0.057429 .  
## landuse:precip  539.3  134.83     4 22.061  4.6971  0.006794 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t_nm5_means_tp <- lsmeans(t_nm5, ~landuse*precip, adjust="tukey")
t_nm5_pwc_tp <- cld(t_nm5_means_tp, adjust = "none", Letters = letters, reversed = T)
t_nm5_pwc_tp <- as.data.frame(t_nm5_pwc_tp)

#Determining the real SE
real_se_t_nm5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(t_nm),
    sd=sd(t_nm)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_t_nm5 <- merge(df, real_se_t_nm5, by=c("precip")) 
t_nm5_pwc_tp_5 <- merge(t_nm5_pwc_tp, real_se_t_nm5, by=c("precip", "landuse"))
t_nm5_pwc_tp_5 <- as.data.frame(t_nm5_pwc_tp_5)
t_nm5_pwc_tp_5$location_f =factor(t_nm5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=t_nm5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 70)) +  
  xlab("")+
  ggtitle("A) 0-5 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Total~ Nitrogen ~(~mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3t_nm5.png",  height=5, width=4)

4.1.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
t_nm10 <- lmer(t_nm ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(t_nm10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        807.06  403.53     2    27 74.4974 1.021e-11 ***
## precip          26.72   13.36     2    27  2.4667   0.10378    
## landuse:precip  69.61   17.40     4    27  3.2128   0.02793 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t_nm10_means_tp <- lsmeans(t_nm10, ~landuse*precip, adjust="tukey")
t_nm10_pwc_tp <- cld(t_nm10_means_tp, adjust = "none", Letters = letters, reversed = T)
t_nm10_pwc_tp <- as.data.frame(t_nm10_pwc_tp)

#Determining the real SE
real_se_t_nm10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(t_nm),
    sd=sd(t_nm)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_t_nm10 <- merge(df, real_se_t_nm10, by=c("precip")) 
t_nm10_pwc_tp_10 <- merge(t_nm10_pwc_tp, real_se_t_nm10, by=c("precip", "landuse"))
t_nm10_pwc_tp_10 <- as.data.frame(t_nm10_pwc_tp_10)
t_nm10_pwc_tp_10$location_f =factor(t_nm10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=t_nm10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 70)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Total~ Nitrogen ~(~mg ~kg^{-1} ~soil)))+
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3t_nm10.png",  height=5, width=4)

4.1.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
t_nm15 <- lmer(t_nm ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(t_nm15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        370.06 185.028     2    27 41.9811 5.171e-09 ***
## precip          18.39   9.194     2    27  2.0861  0.143727    
## landuse:precip  86.78  21.694     4    27  4.9223  0.004117 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
t_nm15_means_tp <- lsmeans(t_nm15, ~landuse*precip, adjust="tukey")
t_nm15_pwc_tp <- cld(t_nm15_means_tp, adjust = "none", Letters = letters, reversed = T)
t_nm15_pwc_tp <- as.data.frame(t_nm15_pwc_tp)

#Determining the real SE
real_se_t_nm15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(t_nm),
    sd=sd(t_nm)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_t_nm15 <- merge(df, real_se_t_nm15, by=c("precip")) 
t_nm15_pwc_tp_15 <- merge(t_nm15_pwc_tp, real_se_t_nm15, by=c("precip", "landuse"))
t_nm15_pwc_tp_15 <- as.data.frame(t_nm15_pwc_tp_15)
t_nm15_pwc_tp_15$location_f =factor(t_nm15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=t_nm15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.8)) +
  ylab(expression(Total~ Nitrogen ~(~mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3t_np15.png",  height=5, width=4)

4.2 Soil Organic Carbon

4.2.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
to_cg5 <- lmer(to_cg ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(to_cg5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        6819.7  3409.8     2 22.001 74.8600 1.525e-10 ***
## precip          144.2    72.1     2 10.953  1.5827  0.249007    
## landuse:precip  866.7   216.7     4 22.001  4.7568  0.006431 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
to_cg5_means_tp <- lsmeans(to_cg5, ~landuse*precip, adjust="tukey")
to_cg5_pwc_tp <- cld(to_cg5_means_tp, adjust = "none", Letters = letters, reversed = T)
to_cg5_pwc_tp <- as.data.frame(to_cg5_pwc_tp)

#Determining the real SE
real_se_to_cg5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(to_cg),
    sd=sd(to_cg)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_to_cg5 <- merge(df, real_se_to_cg5, by=c("precip")) 
to_cg5_pwc_tp_5 <- merge(to_cg5_pwc_tp, real_se_to_cg5, by=c("precip", "landuse"))
to_cg5_pwc_tp_5 <- as.data.frame(to_cg5_pwc_tp_5)
to_cg5_pwc_tp_5$location_f =factor(to_cg5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=to_cg5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  xlab("")+
   ggtitle("A) 0-5 cm")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab(expression(Soil~ Organic ~Carbon ~(~g ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3to_cp5.png",  height=5, width=4)

4.2.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
to_cg10 <- lmer(to_cg ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(to_cg10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        1438.07  719.03     2    27 130.536 1.319e-14 ***
## precip          242.70  121.35     2    27  22.030 2.120e-06 ***
## landuse:precip  154.96   38.74     4    27   7.033 0.0005146 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
to_cg10_means_tp <- lsmeans(to_cg10, ~landuse*precip, adjust="tukey")
to_cg10_pwc_tp <- cld(to_cg10_means_tp, adjust = "none", Letters = letters, reversed = T)
to_cg10_pwc_tp <- as.data.frame(to_cg10_pwc_tp)

#Determining the real SE
real_se_to_cg10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(to_cg),
    sd=sd(to_cg)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_to_cg10 <- merge(df, real_se_to_cg10, by=c("precip")) 
to_cg10_pwc_tp_10 <- merge(to_cg10_pwc_tp, real_se_to_cg10, by=c("precip", "landuse"))
to_cg10_pwc_tp_10 <- as.data.frame(to_cg10_pwc_tp_10)
to_cg10_pwc_tp_10$location_f =factor(to_cg10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=to_cg10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(Soil~ Organic ~Carbon ~(~g ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3to_cp10.png",  height=5, width=4)

4.2.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
to_cg15 <- lmer(to_cg ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(to_cg15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        696.14  348.07     2 22.464 64.6753 4.780e-10 ***
## precip         306.41  153.21     2 12.489 28.4674 2.228e-05 ***
## landuse:precip 166.07   41.52     4 22.464  7.7142 0.0004555 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
to_cg15_means_tp <- lsmeans(to_cg15, ~landuse*precip, adjust="tukey")
to_cg15_pwc_tp <- cld(to_cg15_means_tp, adjust = "none", Letters = letters, reversed = T)
to_cg15_pwc_tp <- as.data.frame(to_cg15_pwc_tp)

#Determining the real SE
real_se_to_cg15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(to_cg),
    sd=sd(to_cg)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_to_cg15 <- merge(df, real_se_to_cg15, by=c("precip")) 
to_cg15_pwc_tp_15 <- merge(to_cg15_pwc_tp, real_se_to_cg15, by=c("precip", "landuse"))
to_cg15_pwc_tp_15 <- as.data.frame(to_cg15_pwc_tp_15)
to_cg15_pwc_tp_15$location_f =factor(to_cg15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=to_cg15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,70)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm ")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(Soil~ Organic ~Carbon ~(~g ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3to_cp15.png",  height=5, width=4)

4.3 Extractable Ca Content (mg/kg)

4.3.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
ca5 <- lmer(ca ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(ca5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         7009233  3504617     2    27  49.290 9.728e-10 ***
## precip         31173574 15586787     2    27 219.216 < 2.2e-16 ***
## landuse:precip 15354522  3838631     4    27  53.987 1.710e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ca5_means_tp <- lsmeans(ca5, ~landuse*precip, adjust="tukey")
ca5_pwc_tp <- cld(ca5_means_tp, adjust = "none", Letters = letters, reversed = T)
ca5_pwc_tp <- as.data.frame(ca5_pwc_tp)

#Determining the real SE
real_se_ca5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ca),
    sd=sd(ca)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ca5 <- merge(df, real_se_ca5, by=c("precip")) 

ca5_pwc_tp_5 <- merge(ca5_pwc_tp, real_se_ca5, by=c("precip", "landuse"))
ca5_pwc_tp_5 <- as.data.frame(ca5_pwc_tp_5)
ca5_pwc_tp_5$location_f =factor(ca5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ca5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,7000)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Ca ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+800),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ca5.png",  height=5, width=4)

4.3.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
ca10 <- lmer(ca ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(ca10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse         9036133  4518066     2 24.347  62.697 2.491e-10 ***
## precip         21699428 10849714     2 22.878 150.561 6.797e-14 ***
## landuse:precip 17326979  4331745     4 23.817  60.111 4.237e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ca10_means_tp <- lsmeans(ca10, ~landuse*precip, adjust="tukey")
ca10_pwc_tp <- cld(ca10_means_tp, adjust = "none", Letters = letters, reversed = T)
ca10_pwc_tp <- as.data.frame(ca10_pwc_tp)

#Determining the real SE
real_se_ca10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ca),
    sd=sd(ca)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ca10 <- merge(df, real_se_ca10, by=c("precip")) 
ca10_pwc_tp_10 <- merge(ca10_pwc_tp, real_se_ca10, by=c("precip", "landuse"))
ca10_pwc_tp_10 <- as.data.frame(ca10_pwc_tp_10)
ca10_pwc_tp_10$location_f =factor(ca10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ca10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,7000)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Ca ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+800),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ca10.png",  height=5, width=4)

4.3.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
ca15 <- lmer(ca ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(ca15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        7358980 3679490     2    27 12.6716 0.0001315 ***
## precip         5663302 2831651     2    27  9.7518 0.0006491 ***
## landuse:precip 7035408 1758852     4    27  6.0572 0.0012981 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ca15_means_tp <- lsmeans(ca15, ~landuse*precip, adjust="tukey")
ca15_pwc_tp <- cld(ca15_means_tp, adjust = "none", Letters = letters, reversed = T)

ca15_pwc_tp <- as.data.frame(ca15_pwc_tp)

#Determining the real SE
real_se_ca15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ca),
    sd=sd(ca)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ca15 <- merge(df, real_se_ca15, by=c("precip")) 
ca15_pwc_tp_15 <- merge(ca15_pwc_tp, real_se_ca15, by=c("precip", "landuse"))
ca15_pwc_tp_15 <- as.data.frame(ca15_pwc_tp_15)
ca15_pwc_tp_15$location_f =factor(ca15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ca15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,7000)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Ca ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+800),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ca15.png",  height=5, width=4)

4.4 Extractable Cu Content (mg/kg)

4.4.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
cu5 <- lmer(cu ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(cu5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.35389 0.17694     2    27   9.800 0.0006312 ***
## precip         0.75056 0.37528     2    27  20.785 3.433e-06 ***
## landuse:precip 0.74444 0.18611     4    27  10.308 3.361e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cu5_means_tp <- lsmeans(cu5, ~landuse*precip, adjust="tukey")
cu5_pwc_tp <- cld(cu5_means_tp, adjust = "none", Letters = letters, reversed = T)
cu5_pwc_tp <- as.data.frame(cu5_pwc_tp)

#Determining the real SE
real_se_cu5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(cu),
    sd=sd(cu)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_cu5 <- merge(df, real_se_cu5, by=c("precip")) 
cu5_pwc_tp_5 <- merge(cu5_pwc_tp, real_se_cu5, by=c("precip", "landuse"))
cu5_pwc_tp_5 <- as.data.frame(cu5_pwc_tp_5)
cu5_pwc_tp_5$location_f =factor(cu5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=cu5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,3)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Cu ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3cu5.png",  height=5, width=4)

4.4.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
cu10 <- lmer(cu ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(cu10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.37167 0.18583     2    27  7.8093  0.002108 ** 
## precip         0.78167 0.39083     2    27 16.4241 2.154e-05 ***
## landuse:precip 0.93167 0.23292     4    27  9.7879 5.010e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cu10_means_tp <- lsmeans(cu10, ~landuse*precip, adjust="tukey")
cu10_pwc_tp <- cld(cu10_means_tp, adjust = "none", Letters = letters, reversed = T)
cu10_pwc_tp <- as.data.frame(cu10_pwc_tp)

#Determining the real SE
real_se_cu10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(cu),
    sd=sd(cu)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_cu10 <- merge(df, real_se_cu10, by=c("precip")) 
cu10_pwc_tp_10 <- merge(cu10_pwc_tp, real_se_cu10, by=c("precip", "landuse"))
cu10_pwc_tp_10 <- as.data.frame(cu10_pwc_tp_10)
cu10_pwc_tp_10$location_f =factor(cu10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=cu10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,3)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Cu ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3cu10.png",  height=5, width=4)

4.4.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
cu15 <- lmer(cu ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(cu15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        0.06056 0.03028     2 22.025  0.3403 0.7152350    
## precip         2.48820 1.24410     2 11.788 13.9826 0.0007733 ***
## landuse:precip 0.36444 0.09111     4 22.025  1.0240 0.4167914    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cu15_means <- lsmeans(cu15, ~landuse*precip, adjust="tukey")
cu15_pwc_tp <- cld(cu15_means, adjust = "none", Letters = letters, reversed = T)
cu15_pwc_tp <- as.data.frame(cu15_pwc_tp)

#Determining the real SE
real_se_cu15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(cu),
    sd=sd(cu)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_cu15 <- merge(df, real_se_cu15, by=c("precip")) 
cu15_pwc_tp_15 <- merge(cu15_pwc_tp, real_se_cu15, by=c("precip", "landuse"))
cu15_pwc_tp_15 <- as.data.frame(cu15_pwc_tp_15)
cu15_pwc_tp_15$location_f =factor(cu15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))


ggplot(data=cu15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,3)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Cu ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3cu15.png",  height=5, width=4)

4.5 Extractable Mg Content (mg/kg)

4.5.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
mg5 <- lmer(mg ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(mg5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         57111   28555     2    27  16.242 2.338e-05 ***
## precip          39459   19730     2    27  11.222 0.0002836 ***
## landuse:precip 241814   60453     4    27  34.386 3.111e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mg5_means_tp <- lsmeans(mg5, ~landuse*precip, adjust="tukey")
mg5_pwc_tp <- cld(mg5_means_tp, adjust = "none", Letters = letters, reversed = T)
mg5_pwc_tp <- as.data.frame(mg5_pwc_tp)

#Determining the real SE
real_se_mg5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mg),
    sd=sd(mg)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mg5 <- merge(df, real_se_mg5, by=c("precip")) 
mg5_pwc_tp_5 <- merge(mg5_pwc_tp, real_se_mg5, by=c("precip", "landuse"))
mg5_pwc_tp_5 <- as.data.frame(mg5_pwc_tp_5)
mg5_pwc_tp_5$location_f =factor(mg5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mg5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,600)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Mg ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+50),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mg5.png",  height=5, width=4)

4.5.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
mg10 <- lmer(mg ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(mg10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         46535   23268     2    27  28.783 2.024e-07 ***
## precip          54057   27028     2    27  33.435 4.946e-08 ***
## landuse:precip 329907   82477     4    27 102.028 6.884e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mg10_means_tp <- lsmeans(mg10, ~landuse*precip, adjust="tukey")
mg10_pwc_tp <- cld(mg10_means_tp, adjust = "none", Letters = letters, reversed = T)
mg10_pwc_tp <- as.data.frame(mg10_pwc_tp)

#Determining the real SE
real_se_mg10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mg),
    sd=sd(mg)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mg10 <- merge(df, real_se_mg10, by=c("precip")) 
mg10_pwc_tp_10 <- merge(mg10_pwc_tp, real_se_mg10, by=c("precip", "landuse"))
mg10_pwc_tp_10 <- as.data.frame(mg10_pwc_tp_10)
mg10_pwc_tp_10$location_f =factor(mg10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mg10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,600)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Mg ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+50),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mg10.png",  height=5, width=4)

4.5.3 10-15 cm

z
## [1] "10-15 cm"
nut5$precip <- as.factor(nut5$precip)
mg15 <- lmer(mg ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(mg15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         57111   28555     2    27  16.242 2.338e-05 ***
## precip          39459   19730     2    27  11.222 0.0002836 ***
## landuse:precip 241814   60453     4    27  34.386 3.111e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mg15_means_tp <- lsmeans(mg15, ~landuse*precip, adjust="tukey")
mg15_pwc_tp <- cld(mg15_means_tp, adjust = "none", Letters = letters, reversed = T)
mg15_pwc_tp <- as.data.frame(mg15_pwc_tp)
mg15_pwc_tp
##   landuse precip  lsmean       SE df lower.CL upper.CL  .group
## 7      NP    850 477.550 20.96458 27 434.5342 520.5658  a     
## 1      AG    579 466.375 20.96458 27 423.3592 509.3908  a     
## 2      EA    850 422.150 20.96458 27 379.1342 465.1658  ab    
## 6      NP    472 377.675 20.96458 27 334.6592 420.6908   bc   
## 5      EA    579 377.500 20.96458 27 334.4842 420.5158   bc   
## 3      NP    579 320.250 20.96458 27 277.2342 363.2658    cd  
## 8      EA    472 285.225 20.96458 27 242.2092 328.2408     de 
## 4      AG    472 259.075 20.96458 27 216.0592 302.0908      e 
## 9      AG    850 163.700 20.96458 27 120.6842 206.7158       f
#Determining the real SE
real_se_mg15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mg),
    sd=sd(mg)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mg15 <- merge(df, real_se_mg15, by=c("precip")) 
mg15_pwc_tp_15 <- merge(mg15_pwc_tp, real_se_mg15, by=c("precip", "landuse"))
mg15_pwc_tp_15 <- as.data.frame(mg15_pwc_tp_15)
mg15_pwc_tp_15$location_f =factor(mg15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mg15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,600)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Mg ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+80),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mg15.png",  height=5, width=4)

4.6 Extractable Mn Content (mg/kg)

4.6.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
mn5 <- lmer(mn ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(mn5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         242.6   121.3     2    27  0.6326  0.538894    
## precip         7248.9  3624.5     2    27 18.9060 7.346e-06 ***
## landuse:precip 4656.5  1164.1     4    27  6.0723  0.001279 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mn5_means_tp <- lsmeans(mn5, ~landuse*precip, adjust="tukey")
mn5_pwc_tp <- cld(mn5_means_tp, adjust = "none", Letters = letters, reversed = T)
mn5_pwc_tp <- as.data.frame(mn5_pwc_tp)

#Determining the real SE
real_se_mn5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mn),
    sd=sd(mn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mn5 <- merge(df, real_se_mn5, by=c("precip")) 
mn5_pwc_tp_5 <- merge(mn5_pwc_tp, real_se_mn5, by=c("precip", "landuse"))
mn5_pwc_tp_5 <- as.data.frame(mn5_pwc_tp_5)
mn5_pwc_tp_5$location_f =factor(mn5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mn5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,150)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Mn ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+10),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mn5.png",  height=5, width=4)

4.6.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
mn10 <- lmer(mn ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(mn10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse         182.81   91.41     2 20.868  1.7656  0.195694    
## precip         1554.28  777.14     2  9.467 15.0116  0.001159 ** 
## landuse:precip 2685.85  671.46     4 16.975 12.9702 5.099e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mn10_means_tp <- lsmeans(mn10, ~landuse*precip, adjust="tukey")
mn10_pwc_tp <- cld(mn10_means_tp, adjust = "none", Letters = letters, reversed = T)
mn10_pwc_tp <- as.data.frame(mn10_pwc_tp)

#Determining the real SE
real_se_mn10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mn),
    sd=sd(mn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mn10 <- merge(df, real_se_mn10, by=c("precip")) 
mn10_pwc_tp <- merge(mn10_pwc_tp, real_se_mn10, by=c("precip", "landuse"))
mn10_pwc_tp <- as.data.frame(mn10_pwc_tp)
mn10_pwc_tp$location_f =factor(mn10_pwc_tp$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mn10_pwc_tp, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,150)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Mn ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+10),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mn10.png",  height=5, width=4)

4.6.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
mn15 <- lmer(mn ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(mn15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value   Pr(>F)   
## landuse         353.51  176.75     2    27  2.7892 0.079227 . 
## precip          429.43  214.71     2    27  3.3882 0.048657 * 
## landuse:precip 1488.64  372.16     4    27  5.8727 0.001557 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
mn15_means_tp <- lsmeans(mn15, ~landuse*precip, adjust="tukey")
mn15_pwc_tp <- cld(mn15_means_tp, adjust = "none", Letters = letters, reversed = T)
mn15_pwc_tp <- as.data.frame(mn15_pwc_tp)

#Determining the real SE
real_se_mn15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(mn),
    sd=sd(mn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_mn15 <- merge(df, real_se_mn15, by=c("precip")) 
mn15_pwc_tp_15 <- merge(mn15_pwc_tp, real_se_mn15, by=c("precip", "landuse"))
mn15_pwc_tp_15 <- as.data.frame(mn15_pwc_tp_15)
mn15_pwc_tp_15$location_f =factor(mn15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=mn15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,150)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Mn ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+10),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3mn15.png",  height=5, width=4)

4.7 Extractable Na Content (mg/kg)

4.7.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
na5 <- lmer(na ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(na5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse         29.40   14.70     2 22.427  1.9051 0.1721177    
## precip         989.15  494.57     2 11.629 64.1072 5.246e-07 ***
## landuse:precip 220.04   55.01     4 22.427  7.1306 0.0007342 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
na5_means_tp <- lsmeans(na5, ~landuse*precip, adjust="tukey")
na5_pwc_tp <- cld(na5_means_tp, adjust = "none", Letters = letters, reversed = T)
na5_pwc_tp <- as.data.frame(na5_pwc_tp)

#Determining the real SE
real_se_na5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(na),
    sd=sd(na)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_na5<- merge(df, real_se_na5, by=c("precip")) 
na5_pwc_tp_5 <- merge(na5_pwc_tp, real_se_na5, by=c("precip", "landuse"))
na5_pwc_tp_5 <- as.data.frame(na5_pwc_tp_5)
na5_pwc_tp_5$location_f =factor(na5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=na5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,140)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Na ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3na5.png",  height=5, width=4)

4.7.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
na10 <- lmer(na ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(na10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         721.38  360.69     2    27  6.0314 0.0068328 ** 
## precip         2068.41 1034.21     2    27 17.2938 1.463e-05 ***
## landuse:precip 1545.63  386.41     4    27  6.4614 0.0008785 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
na10_means_tp <- lsmeans(na10, ~landuse*precip, adjust="tukey")
na10_pwc_tp <- cld(na10_means_tp, adjust = "none", Letters = letters, reversed = T)
na10_pwc_tp <- as.data.frame(na10_pwc_tp)

#Determining the real SE
real_se_na10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(na),
    sd=sd(na)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_na10 <- merge(df, real_se_na10, by=c("precip")) 
na10_pwc_tp_10 <- merge(na10_pwc_tp, real_se_na10, by=c("precip", "landuse"))
na10_pwc_tp_10 <- as.data.frame(na10_pwc_tp_10)
na10_pwc_tp_10$location_f =factor(na10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=na10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,140)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Na ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3na10.png",  height=5, width=4)

4.7.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
na15 <- lmer(na ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(na15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value   Pr(>F)   
## landuse         3773.7  1886.9     2 23.033  3.5038 0.046932 * 
## precip          7890.5  3945.2     2 13.932  7.3262 0.006696 **
## landuse:precip 11474.1  2868.5     4 23.033  5.3268 0.003462 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
na15_means_tp <- lsmeans(na15, ~landuse*precip, adjust="tukey")
na15_pwc_tp <- cld(na15_means_tp, adjust = "none", Letters = letters, reversed = T)
na15_pwc_tp <- as.data.frame(na15_pwc_tp)

#Determining the real SE
real_se_na15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(na),
    sd=sd(na)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_na15<- merge(df, real_se_na15, by=c("precip")) 
na15_pwc_tp_15 <- merge(na15_pwc_tp, real_se_na15, by=c("precip", "landuse"))
na15_pwc_tp_15 <- as.data.frame(na15_pwc_tp_15)
na15_pwc_tp_15$location_f =factor(na15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=na15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,140)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Na ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3na15.png",  height=5, width=4)

4.8 Extractable P Content (mg/kg)

4.8.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
p5 <- lmer(p ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(p5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF  F value    Pr(>F)    
## landuse         21336   10668     2    27  40.5810 7.301e-09 ***
## precip          73716   36858     2    27 140.2049 5.486e-15 ***
## landuse:precip   8487    2122     4    27   8.0712 0.0002044 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
p5_means_tp <- lsmeans(p5, ~landuse*precip, adjust="tukey")
p5_pwc_tp <- cld(p5_means_tp, adjust = "none", Letters = letters, reversed = T)
p5_pwc_tp <- as.data.frame(p5_pwc_tp)

#Determining the real SE
real_se_p5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(p),
    sd=sd(p)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_p5 <- merge(df, real_se_p5, by=c("precip")) 
p5_pwc_tp_5 <- merge(p5_pwc_tp, real_se_p5, by=c("precip", "landuse"))
p5_pwc_tp_5 <- as.data.frame(p5_pwc_tp_5)
p5_pwc_tp_5$location_f =factor(p5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=p5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,180)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.8,0.85)) +
  ylab(expression(~Extractable ~P ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+10),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3p5.png",  height=5, width=4)

4.8.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
p10 <- lmer(p ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(p10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         15284  7641.9     2    27  34.241 3.931e-08 ***
## precip          62416 31208.2     2    27 139.834 5.667e-15 ***
## landuse:precip  14130  3532.4     4    27  15.828 8.723e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
p10_means_tp <- lsmeans(p10, ~landuse*precip, adjust="tukey")
p10_pwc_tp <- cld(p10_means_tp, adjust = "none", Letters = letters, reversed = T)
p10_pwc_tp <- as.data.frame(p10_pwc_tp)

#Determining the real SE
real_se_p10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(p),
    sd=sd(p)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_p10 <- merge(df, real_se_p10, by=c("precip")) 
p10_pwc_tp_10 <- merge(p10_pwc_tp, real_se_p10, by=c("precip", "landuse"))
p10_pwc_tp_10 <- as.data.frame(p10_pwc_tp_10)
p10_pwc_tp_10$location_f =factor(p10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=p10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,180)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.8,0.85)) +
  ylab(expression(~Extractable ~P ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+10),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3p10.png",  height=5, width=4)

4.8.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
p15 <- lmer(p ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(p15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse         5499.4  2749.7     2 19.3987  8.2129 0.0026063 ** 
## precip         17013.2  8506.6     2  7.2177 25.4077 0.0005407 ***
## landuse:precip  6094.0  1523.5     4 19.3987  4.5505 0.0092835 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
p15_means_tp <- lsmeans(p15, ~landuse*precip, adjust="tukey")
p15_pwc_tp <- cld(p15_means_tp, adjust = "none", Letters = letters, reversed = T)
p15_pwc_tp <- as.data.frame(p15_pwc_tp)

#Determining the real SE
real_se_p15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(p),
    sd=sd(p)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_p15 <- merge(df, real_se_p15, by=c("precip")) 
p15_pwc_tp_15 <- merge(p15_pwc_tp, real_se_p15, by=c("precip", "landuse"))
p15_pwc_tp_15 <- as.data.frame(p15_pwc_tp_15)
p15_pwc_tp_15$location_f =factor(p15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=p15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,180)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.8,0.85)) +
  ylab(expression(~Extractable ~P ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+10),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3p15.png",  height=5, width=4)

4.9 Extractable K Content (mg/kg)

4.9.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
k5 <- lmer(k ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(k5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF  F value    Pr(>F)    
## landuse          34783   17392     2    27   1.8390 0.1783388    
## precip         2056627 1028313     2    27 108.7343 1.209e-13 ***
## landuse:precip  289676   72419     4    27   7.6576 0.0002932 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
k5_means_tp <- lsmeans(k5, ~landuse*precip, adjust="tukey")
k5_pwc_tp <- cld(k5_means_tp, adjust = "none", Letters = letters, reversed = T)
k5_pwc_tp <- as.data.frame(k5_pwc_tp)

#Determining the real SE
real_se_k5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(k),
    sd=sd(k)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_k5 <- merge(df, real_se_k5, by=c("precip")) 
k5_pwc_tp_5 <- merge(k5_pwc_tp, real_se_k5, by=c("precip", "landuse"))
k5_pwc_tp_5 <- as.data.frame(k5_pwc_tp_5)
k5_pwc_tp_5$location_f =factor(k5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=k5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1500)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.85)) +
  ylab(expression(~Extractable ~K ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+50),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3k5.png",  height=5, width=4)

4.9.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
k10 <- lmer(k ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(k10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF  F value    Pr(>F)    
## landuse         32762   16381     2 15.7489   5.4118 0.0162582 *  
## precip         629971  314985     2  8.8449 104.0603 7.147e-07 ***
## landuse:precip 120576   30144     4 14.4615   9.9585 0.0004418 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
k10_means_tp <- lsmeans(k10, ~landuse*precip, adjust="tukey")
k10_pwc <- cld(k10_means_tp, adjust = "none", Letters = letters, reversed = T)
k5_pwc <- as.data.frame(k10_pwc)

#Determining the real SE
real_se_k10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(k),
    sd=sd(k)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_k10 <- merge(df, real_se_k10, by=c("precip")) 
k10_pwc_tp <- merge(k10_pwc, real_se_k10, by=c("precip", "landuse"))
k10_pwc_tp <- as.data.frame(k10_pwc_tp)
k10_pwc_tp$location_f =factor(k10_pwc_tp$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=k10_pwc_tp, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1500)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.85)) +
  ylab(expression(~Extractable ~K ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+50),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3k10.png",  height=5, width=4)

4.9.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
k15 <- lmer(k ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(k15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse          53430   26715     2 18.193  4.8484   0.02052 *  
## precip         1071859  535929     2  6.321 97.2625 1.789e-05 ***
## landuse:precip   65962   16490     4 18.193  2.9927   0.04637 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
k15_means_tp <- lsmeans(k15, ~landuse*precip, adjust="tukey")
k15_pwc <- cld(k15_means_tp, adjust = "none", Letters = letters, reversed = T)
k15_pwc <- as.data.frame(k15_pwc)

#Determining the real SE
real_se_k15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(k),
    sd=sd(k)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_k15 <- merge(df, real_se_k15, by=c("precip")) 
k15_pwc_tp <- merge(k15_pwc, real_se_k15, by=c("precip", "landuse"))
k15_pwc_tp <- as.data.frame(k15_pwc_tp)
k15_pwc_tp$location_f =factor(k15_pwc_tp$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=k15_pwc_tp, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,1500)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.85)) +
  ylab(expression(~Extractable ~K ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+50),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3k15.png",  height=5, width=4)

4.10 Extractable Zn Content (mg/kg)

4.10.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
zn5 <- lmer(zn ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(zn5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        77.176  38.588     2 22.482 32.9865 2.055e-07 ***
## precip         11.203   5.602     2 11.707  4.7884   0.03023 *  
## landuse:precip 16.711   4.178     4 22.482  3.5713   0.02130 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
zn5_means_tp <- lsmeans(zn5, ~landuse*precip, adjust="tukey")
zn5_pwc_tp <- cld(zn5_means_tp, adjust = "none", Letters = letters, reversed = T)
zn5_pwc_tp <- as.data.frame(zn5_pwc_tp)

#Determining the real SE
real_se_zn5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(zn),
    sd=sd(zn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_zn5 <- merge(df, real_se_zn5, by=c("precip")) 
zn5_pwc_tp_5 <- merge(zn5_pwc_tp, real_se_zn5, by=c("precip", "landuse"))
zn5_pwc_tp_5 <- as.data.frame(zn5_pwc_tp_5)
zn5_pwc_tp_5$location_f =factor(zn5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=zn5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,8)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.85)) +
  ylab(expression(~Extractable ~Zn ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3zn5.png",  height=5, width=4)

4.10.2 5-10 cm

x
## [1] "0-5 cm"
nut10$precip <- as.factor(nut10$precip)
zn10 <- lmer(zn ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(zn10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        3.5473 1.77366     2 23.297 11.6378 0.0003132 ***
## precip         0.5015 0.25077     2 14.874  1.6454 0.2261800    
## landuse:precip 4.6864 1.17161     4 20.913  7.6874 0.0005648 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
zn10_means_tp <- lsmeans(zn10, ~landuse*precip, adjust="tukey")
zn10_pwc_tp <- cld(zn10_means_tp, adjust = "none", Letters = letters, reversed = T)
zn10_pwc_tp <- as.data.frame(zn10_pwc_tp)

#Determining the real SE
real_se_zn10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(zn),
    sd=sd(zn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_zn10 <- merge(df, real_se_zn10, by=c("precip")) 
zn10_pwc_tp_10 <- merge(zn10_pwc_tp, real_se_zn10, by=c("precip", "landuse"))
zn10_pwc_tp_10 <- as.data.frame(zn10_pwc_tp_10)
zn10_pwc_tp_10$location_f =factor(zn10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=zn10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,8)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.85)) +
  ylab(expression(~Extractable ~Zn ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3zn10.png",  height=5, width=4)

4.10.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
zn15 <- lmer(zn ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(zn15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value Pr(>F)
## landuse        0.34667 0.17333     2 20.0654  2.5728 0.1012
## precip         0.32207 0.16104     2  8.8917  2.3903 0.1477
## landuse:precip 0.51667 0.12917     4 20.0654  1.9172 0.1467
zn15_means_tp <- lsmeans(zn15, ~landuse*precip, adjust="tukey")
zn15_pwc_tp <- cld(zn15_means_tp, adjust = "none", Letters = letters, reversed = T)
zn15_pwc_tp <- as.data.frame(zn15_pwc_tp)

#Determining the real SE
real_se_zn15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(zn),
    sd=sd(zn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_zn15 <- merge(df, real_se_zn15, by=c("precip")) 
zn15_pwc_tp_15 <- merge(zn15_pwc_tp, real_se_zn15, by=c("precip", "landuse"))
zn15_pwc_tp_15 <- as.data.frame(zn15_pwc_tp_15)
zn15_pwc_tp_15$location_f =factor(zn15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=zn15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,8)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.85)) +
  ylab(expression(~Extractable ~Zn ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3zn15.png",  height=5, width=4)

4.11 Extractable Fe Content (mg/kg)

4.11.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
fe5 <- lmer(fe ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(fe5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        4841.8  2420.9     2    27 16.6676 1.931e-05 ***
## precip           53.0    26.5     2    27  0.1824 0.8342736    
## landuse:precip 4415.3  1103.8     4    27  7.5997 0.0003086 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fe5_means_tp <- lsmeans(fe5, ~landuse*precip, adjust="tukey")
fe5_pwc_tp <- cld(fe5_means_tp, adjust = "none", Letters = letters, reversed = T)
fe5_pwc_tp <- as.data.frame(fe5_pwc_tp)

#Determining the real SE
real_se_fe5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fe),
    sd=sd(fe)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fe5 <- merge(df, real_se_fe5, by=c("precip")) 
fe5_pwc_tp_5 <- merge(fe5_pwc_tp, real_se_fe5, by=c("precip", "landuse"))
fe5_pwc_tp_5 <- as.data.frame(fe5_pwc_tp_5)
fe5_pwc_tp_5$location_f =factor(fe5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fe5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,120)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.86)) +
  ylab(expression(~Extractable ~Fe ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fe5.png",  height=5, width=4)

4.11.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
fe10 <- lmer(fe ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(fe10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        3358.8  1679.4     2 23.559 10.2025 0.0006433 ***
## precip         3249.6  1624.8     2 17.795  9.8709 0.0013055 ** 
## landuse:precip 9292.7  2323.2     4 22.012 14.1134 7.495e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fe10_means_tp <- lsmeans(fe10, ~landuse*precip, adjust="tukey")
fe10_pwc_tp <- cld(fe10_means_tp, adjust = "none", Letters = letters, reversed = T)
fe10_pwc_tp <- as.data.frame(fe10_pwc_tp)

#Determining the real SE
real_se_fe10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fe),
    sd=sd(fe)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fe10 <- merge(df, real_se_fe10, by=c("precip")) 
fe10_pwc_tp_10 <- merge(fe10_pwc_tp, real_se_fe10, by=c("precip", "landuse"))
fe10_pwc_tp_10 <- as.data.frame(fe10_pwc_tp_10)
fe10_pwc_tp_10$location_f =factor(fe10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fe10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,120)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Fe ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fe10.png",  height=5, width=4)

4.11.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
fe15 <- lmer(fe ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(fe15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        2495.1  1247.5     2 21.984  7.6293  0.003045 ** 
## precip         9160.5  4580.2     2 11.360 28.0105 4.059e-05 ***
## landuse:precip 6773.5  1693.4     4 21.984 10.3558 7.180e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
fe15_means_tp <- lsmeans(fe15, ~landuse*precip, adjust="tukey")
fe15_pwc_tp <- cld(fe15_means_tp, adjust = "none", Letters = letters, reversed = T)
fe15_pwc_tp <- as.data.frame(fe15_pwc_tp)

#Determining the real SE
real_se_fe15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(fe),
    sd=sd(fe)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_fe15 <- merge(df, real_se_fe15, by=c("precip")) 
fe15_pwc_tp_15 <- merge(fe15_pwc_tp, real_se_fe15, by=c("precip", "landuse"))
fe15_pwc_tp_15 <- as.data.frame(fe15_pwc_tp_15)
fe15_pwc_tp_15$location_f =factor(fe15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=fe15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,120)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(~Extractable ~Fe ~Content ~(mg ~kg^{-1} ~soil))) +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3fe15.png",  height=5, width=4)

4.12 pH

4.12.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
ph5 <- lmer(p_h ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit)
anova(ph5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse         2.4267  1.2133     2    27  13.537 8.473e-05 ***
## precip         11.7950  5.8975     2    27  65.799 4.163e-11 ***
## landuse:precip  6.3683  1.5921     4    27  17.763 2.961e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ph5_means_tp <- lsmeans(ph5, ~landuse*precip, adjust="tukey")
ph5_pwc_tp <- cld(ph5_means_tp, adjust = "none", Letters = letters, reversed = T)
ph5_pwc_tp <- as.data.frame(ph5_pwc_tp)

#Determining the real SE
real_se_ph5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(p_h),
    sd=sd(p_h)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ph5 <- merge(df, real_se_ph5, by=c("precip")) 
ph5_pwc_tp_5 <- merge(ph5_pwc_tp, real_se_ph5, by=c("precip", "landuse"))
ph5_pwc_tp_5 <- as.data.frame(ph5_pwc_tp_5)
ph5_pwc_tp_5$location_f =factor(ph5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ph5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,10)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="pH") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ph5.png",  height=5, width=4)

4.12.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
ph10 <- lmer(p_h ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit)
anova(ph10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        1.2084 0.60418     2 20.755  4.7937  0.019430 *  
## precip         2.5870 1.29348     2 10.673 10.2627  0.003266 ** 
## landuse:precip 9.8712 2.46781     4 17.537 19.5801 2.778e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ph10_means_tp <- lsmeans(ph10, ~landuse*precip, adjust="tukey")
ph10_pwc_tp <- cld(ph10_means_tp, adjust = "none", Letters = letters, reversed = T)
ph10_pwc_tp <- as.data.frame(ph10_pwc_tp)

#Determining the real SE
real_se_ph10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(p_h),
    sd=sd(p_h)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ph10 <- merge(df, real_se_ph10, by=c("precip")) 
ph10_pwc_tp_10 <- merge(ph10_pwc_tp, real_se_ph10, by=c("precip", "landuse"))
ph10_pwc_tp_10 <- as.data.frame(ph10_pwc_tp_10)
ph10_pwc_tp_10$location_f =factor(ph10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ph10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,10)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="pH") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ph10.png",  height=5, width=4)

4.12.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
ph15 <- lmer(p_h ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit)
anova(ph15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        0.6350 0.31750     2 17.6191  1.7504 0.2025847    
## precip         0.3108 0.15539     2  5.3252  0.8567 0.4758018    
## landuse:precip 7.2183 1.80458     4 17.6191  9.9490 0.0002148 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ph15_means_tp <- lsmeans(ph15, ~landuse*precip, adjust="tukey")
ph15_pwc_tp <- cld(ph15_means_tp, adjust = "none", Letters = letters, reversed = T)
ph15_pwc_tp <- as.data.frame(ph15_pwc_tp)

#Determining the real SE
real_se_ph15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(p_h),
    sd=sd(p_h)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ph15 <- merge(df, real_se_ph15, by=c("precip")) 
ph15_pwc_tp_15 <- merge(ph15_pwc_tp, real_se_ph15, by=c("precip", "landuse"))
ph15_pwc_tp_15 <- as.data.frame(ph15_pwc_tp_15)
ph15_pwc_tp_15$location_f =factor(ph15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ph15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,10)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.85,0.25)) +
  labs( y="pH") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ph15.png",  height=5, width=4)

5 Physical

5.1 Clay

5.1.1 0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
clay5 <- lmer(clay ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.67865 (tol = 0.002, component 1)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
##  - Rescale variables?
anova(clay5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF    DenDF    F value Pr(>F)
## landuse        32.889  16.444     2 4.87e-17 1.6471e+30      1
## precip         68.837  34.419     2 4.87e-17 3.4473e+30      1
## landuse:precip 28.444   7.111     4 4.87e-17 7.1225e+29      1
clay5_means_tp <- lsmeans(clay5, ~landuse*precip, adjust="tukey")
clay5_pwc_tp <- cld(clay5_means_tp, adjust = "none", Letters = letters, reversed = T)
clay5_pwc_tp <- as.data.frame(clay5_pwc_tp)

#Determining the real SE
real_se_clay5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(clay),
    sd=sd(clay)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_clay5 <- merge(df, real_se_clay5, by=c("precip")) 
clay5_pwc_tp_5 <- merge(clay5_pwc_tp, real_se_clay5, by=c("precip", "landuse"))
clay5_pwc_tp_5 <- as.data.frame(clay5_pwc_tp_5)
clay5_pwc_tp_5$location_f =factor(clay5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=clay5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(Clay ~("%"))) +
  geom_label(aes(label=trimws(.group), y = lsmean+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3clay5.png",  height=5, width=4)

5.1.2 5-10 cm

y
## [1] "5-10 cm"
agg10$precip <- as.factor(agg10$precip)
clay10 <- lmer(clay ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 4.50873 (tol = 0.002, component 1)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
##  - Rescale variables?
## Warning: Model failed to converge with 1 negative eigenvalue: -3.3e+10
anova(clay10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF      DenDF    F value Pr(>F)
## landuse         32.889  16.444     2 1.0011e-16 7.9833e+29      1
## precip         123.548  61.774     2 1.0011e-16 2.9990e+30      1
## landuse:precip  28.444   7.111     4 1.0011e-16 3.4522e+29      1
clay10_means_tp <- lsmeans(clay10, ~landuse*precip, adjust="tukey")
clay10_pwc_tp <- cld(clay10_means_tp, adjust = "none", Letters = letters, reversed = T)
clay10_pwc_tp <- as.data.frame(clay10_pwc_tp)

#Determining the real SE
real_se_clay10 <- agg10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(clay),
    sd=sd(clay)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_clay10 <- merge(df, real_se_clay10, by=c("precip")) 
clay10_pwc_tp_10 <- merge(clay10_pwc_tp, real_se_clay10, by=c("precip", "landuse"))
clay10_pwc_tp_10 <- as.data.frame(clay10_pwc_tp_10)
clay10_pwc_tp_10$location_f =factor(clay10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=clay10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(Clay ~("%"))) +
  geom_label(aes(label=trimws(.group), y = lsmean+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3clay10.png",  height=5, width=4)

5.1.3 10-15 cm

z
## [1] "10-15 cm"
agg15$precip <- as.factor(agg15$precip)
clay15 <- lmer(clay ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.697761 (tol = 0.002, component 1)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue
##  - Rescale variables?
anova(clay15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF      DenDF    F value Pr(>F)
## landuse         16.889   8.444     2 1.8773e-16 2.1379e+29      1
## precip         109.447  54.724     2 1.8773e-16 1.3854e+30      1
## landuse:precip 313.778  78.444     4 1.8773e-16 1.9860e+30      1
clay15_means_tp <- lsmeans(clay15, ~landuse*precip, adjust="tukey")
clay15_pwc_tp <- cld(clay15_means_tp, adjust = "none", Letters = letters, reversed = T)
clay15_pwc_tp <- as.data.frame(clay15_pwc_tp)

#Determining the real SE
real_se_clay15 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(clay),
    sd=sd(clay)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_clay15 <- merge(df, real_se_clay15, by=c("precip")) 
clay15_pwc_tp_15 <- merge(clay15_pwc_tp, real_se_clay15, by=c("precip", "landuse"))
clay15_pwc_tp_15 <- as.data.frame(clay15_pwc_tp_15)
clay15_pwc_tp_15$location_f =factor(clay15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=clay15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,60)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(expression(Clay ~("%"))) +
  geom_label(aes(label=trimws(.group), y = lsmean+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3clay15.png",  height=5, width=4)

5.2 20 minute MWD

###0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
x20mwd5 <- lmer(x20mwd ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
anova(x20mwd5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        10.6851  5.3426     2    27 46.2074 1.919e-09 ***
## precip          0.0037  0.0018     2    27  0.0160    0.9842    
## landuse:precip  0.5627  0.1407     4    27  1.2166    0.3269    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20mwd5_means_tp <- lsmeans(x20mwd5, ~landuse*precip, adjust="tukey")
x20mwd5_pwc_tp <- cld(x20mwd5_means_tp, adjust = "none", Letters = letters, reversed = T)
x20mwd5_pwc_tp <- as.data.frame(x20mwd5_pwc_tp)

#Determining the real SE
real_se_x20mwd5 <- agg5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20mwd),
    sd=sd(x20mwd)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20mwd5 <- merge(df, real_se_x20mwd5, by=c("precip")) 
x20mwd5_pwc_tp_5 <- merge(x20mwd5_pwc_tp, real_se_x20mwd5, by=c("precip", "landuse"))
x20mwd5_pwc_tp_5 <- as.data.frame(x20mwd5_pwc_tp_5)
x20mwd5_pwc_tp_5$location_f =factor(x20mwd5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20mwd5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,3)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs(y=" Mean Weight Diameter (mm)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20mwd5.png",  height=5, width=4)

5.2.1 5-10 cm

y
## [1] "5-10 cm"
agg10$precip <- as.factor(agg10$precip)
x20mwd10 <- lmer(x20mwd ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
anova(x20mwd10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        7.1641  3.5821     2    27 75.8257 8.343e-12 ***
## precip         0.0123  0.0062     2    27  0.1303  0.878362    
## landuse:precip 1.0749  0.2687     4    27  5.6882  0.001871 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20mwd10_means_tp <- lsmeans(x20mwd10, ~landuse*precip, adjust="tukey")
x20mwd10_pwc_tp <- cld(x20mwd10_means_tp, adjust = "none", Letters = letters, reversed = T)
x20mwd10_pwc_tp <- as.data.frame(x20mwd10_pwc_tp)

#Determining the real SE
real_se_x20mwd10 <- agg10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20mwd),
    sd=sd(x20mwd)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20mwd10 <- merge(df, real_se_x20mwd10, by=c("precip")) 
x20mwd10_pwc_tp_10 <- merge(x20mwd10_pwc_tp, real_se_x20mwd10, by=c("precip", "landuse"))
x20mwd10_pwc_tp_10 <- as.data.frame(x20mwd10_pwc_tp_10)
x20mwd10_pwc_tp_10$location_f =factor(x20mwd10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20mwd10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,3)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs(y=" Mean Weight Diameter (mm)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20mwd10.png",  height=5, width=4)

5.2.2 10-15 cm

x
## [1] "0-5 cm"
agg15$precip <- as.factor(agg15$precip)
x20mwd15 <- lmer(x20mwd ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
anova(x20mwd15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF  F value    Pr(>F)    
## landuse        9.7626  4.8813     2    27 103.8567 2.095e-13 ***
## precip         0.1300  0.0650     2    27   1.3833    0.2680    
## landuse:precip 0.1675  0.0419     4    27   0.8908    0.4828    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20mwd15_means_tp <- lsmeans(x20mwd15, ~landuse*precip, adjust="tukey")
x20mwd15_pwc_tp <- cld(x20mwd15_means_tp, adjust = "none", Letters = letters, reversed = T)
x20mwd15_pwc_tp <- as.data.frame(x20mwd15_pwc_tp)

#Determining the real SE
real_se_x20mwd15 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20mwd),
    sd=sd(x20mwd)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20mwd15 <- merge(df, real_se_x20mwd15, by=c("precip")) 
x20mwd15_pwc_tp_15 <- merge(x20mwd15_pwc_tp, real_se_x20mwd15, by=c("precip", "landuse"))
x20mwd15_pwc_tp_15 <- as.data.frame(x20mwd15_pwc_tp_15)
x20mwd15_pwc_tp_15$location_f =factor(x20mwd15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20mwd15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,3)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs(y=" Mean Weight Diameter (mm)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20mwd15.png",  height=5, width=4)

5.3 20 minute 8-2 mm

5.3.1 0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
x20wsa20005 <- lmer(x20wsa2000 ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
anova(x20wsa20005, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        3614.3 1807.14     2    27 36.3110 2.216e-08 ***
## precip           17.6    8.80     2    27  0.1769    0.8388    
## landuse:precip  210.9   52.71     4    27  1.0592    0.3957    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa20005_means_tp <- lsmeans(x20wsa20005, ~landuse*precip, adjust="tukey")
x20wsa20005_pwc_tp <- cld(x20wsa20005_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa20005_pwc_tp <- as.data.frame(x20wsa20005_pwc_tp)

#Determining the real SE
real_se_x20wsa20005 <- agg5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa2000),
    sd=sd(x20wsa2000)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa20005 <- merge(df, real_se_x20wsa20005, by=c("precip")) 
x20wsa20005_pwc_tp_5 <- merge(x20wsa20005_pwc_tp, real_se_x20wsa20005, by=c("precip", "landuse"))
x20wsa20005_pwc_tp_5 <- as.data.frame(x20wsa20005_pwc_tp_5)
x20wsa20005_pwc_tp_5$location_f =factor(x20wsa20005_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa20005_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(" 8-2 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa20005.png",  height=5, width=4)

5.3.2 5-10 cm

y
## [1] "5-10 cm"
agg10$precip <- as.factor(agg10$precip)
x20wsa200010 <- lmer(x20wsa2000 ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
anova(x20wsa200010, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        2616.00 1308.00     2    27 75.5924 8.643e-12 ***
## precip           12.68    6.34     2    27  0.3665  0.696579    
## landuse:precip  311.07   77.77     4    27  4.4944  0.006514 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa200010_means_tp <- lsmeans(x20wsa200010, ~landuse*precip, adjust="tukey")
x20wsa200010_pwc_tp <- cld(x20wsa200010_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa200010_pwc_tp <- as.data.frame(x20wsa200010_pwc_tp)

#Determining the real SE
real_se_x20wsa200010 <- agg10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa2000),
    sd=sd(x20wsa2000)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa200010 <- merge(df, real_se_x20wsa200010, by=c("precip")) 
x20wsa200010_pwc_tp_10 <- merge(x20wsa200010_pwc_tp, real_se_x20wsa200010, by=c("precip", "landuse"))
x20wsa200010_pwc_tp_10 <- as.data.frame(x20wsa200010_pwc_tp_10)
x20wsa200010_pwc_tp_10$location_f =factor(x20wsa200010_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa200010_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(" 8-2 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa200010.png",  height=5, width=4)

5.3.3 10-15 cm

x
## [1] "0-5 cm"
agg15$precip <- as.factor(agg15$precip)
x20wsa200015 <- lmer(x20wsa2000 ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
anova(x20wsa200015, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF  F value    Pr(>F)    
## landuse        3708.8 1854.41     2    27 128.1703 1.649e-14 ***
## precip           46.3   23.17     2    27   1.6012    0.2202    
## landuse:precip   41.8   10.45     4    27   0.7222    0.5844    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa200015_means_tp <- lsmeans(x20wsa200015, ~landuse*precip, adjust="tukey")
x20wsa200015_pwc_tp <- cld(x20wsa200015_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa200015_pwc_tp <- as.data.frame(x20wsa200015_pwc_tp)

#Determining the real SE
real_se_x20wsa200015 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa2000),
    sd=sd(x20wsa2000)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa200015 <- merge(df, real_se_x20wsa200015, by=c("precip")) 
x20wsa200015_pwc_tp_15 <- merge(x20wsa200015_pwc_tp, real_se_x20wsa200015, by=c("precip", "landuse"))
x20wsa200015_pwc_tp_15 <- as.data.frame(x20wsa200015_pwc_tp_15)
x20wsa200015_pwc_tp_15$location_f =factor(x20wsa200015_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa200015_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,40)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab(" 8-2 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa200015.png",  height=5, width=4)

5.4 20 minute 2-0.25 mm

5.4.1 0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
x20wsa2505 <- lmer(x20wsa250 ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
anova(x20wsa2505, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        1511.80  755.90     2 20.3129 30.6394 7.358e-07 ***
## precip          330.72  165.36     2  8.5003  6.7026   0.01789 *  
## landuse:precip  117.76   29.44     4 20.3129  1.1933   0.34379    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa2505_means_tp <- lsmeans(x20wsa2505, ~landuse*precip, adjust="tukey")
x20wsa2505_pwc_tp <- cld(x20wsa2505_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa2505_pwc_tp <- as.data.frame(x20wsa2505_pwc_tp)

#Determining the real SE
real_se_x20wsa2505 <- agg5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa250),
    sd=sd(x20wsa250)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa2505 <- merge(df, real_se_x20wsa2505, by=c("precip")) 
x20wsa2505_pwc_tp_5 <- merge(x20wsa2505_pwc_tp, real_se_x20wsa2505, by=c("precip", "landuse"))
x20wsa2505_pwc_tp_5 <- as.data.frame(x20wsa2505_pwc_tp_5)
x20wsa2505_pwc_tp_5$location_f =factor(x20wsa2505_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa2505_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,50)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab("2-0.25 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa2505.png",  height=5, width=4)

5.4.2 5-10 cm

y
## [1] "5-10 cm"
agg10$precip <- as.factor(agg10$precip)
x20wsa25010 <- lmer(x20wsa250 ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
anova(x20wsa25010, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        665.80  332.90     2 22.995  8.9628 0.0013246 ** 
## precip         766.37  383.18     2 22.062 10.3166 0.0006871 ***
## landuse:precip 869.98  217.49     4 22.514  5.8557 0.0021993 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa25010_means_tp <- lsmeans(x20wsa25010, ~landuse*precip, adjust="tukey")
x20wsa25010_pwc_tp <- cld(x20wsa25010_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa25010_pwc_tp <- as.data.frame(x20wsa25010_pwc_tp)

#Determining the real SE
real_se_x20wsa25010 <- agg10 %>%
  na.omit()%>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa250),
    sd=sd(x20wsa250)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa25010 <- merge(df, real_se_x20wsa25010, by=c("precip")) 
x20wsa25010_pwc_tp_10 <- merge(x20wsa25010_pwc_tp, real_se_x20wsa25010, by=c("precip", "landuse"))
x20wsa25010_pwc_tp_10 <- as.data.frame(x20wsa25010_pwc_tp_10)
x20wsa25010_pwc_tp_10$location_f =factor(x20wsa25010_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa25010_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,50)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.47,0.83)) +
  ylab("2-0.25 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa25010.png",  height=5, width=4)

5.4.3 10-15 cm

z
## [1] "10-15 cm"
agg15$precip <- as.factor(agg15$precip)
x20wsa25015 <- lmer(x20wsa250 ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
anova(x20wsa25015, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value  Pr(>F)  
## landuse        832.09  416.05     2 22.322  4.4308 0.02396 *
## precip         253.13  126.56     2 11.356  1.3479 0.29837  
## landuse:precip 396.69   99.17     4 22.322  1.0562 0.40112  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa25015_means_tp <- lsmeans(x20wsa25015, ~landuse*precip, adjust="tukey")
x20wsa25015_pwc_tp <- cld(x20wsa25015_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa25015_pwc_tp <- as.data.frame(x20wsa25015_pwc_tp)

#Determining the real SE
real_se_x20wsa25015 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa250),
    sd=sd(x20wsa250)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa25015 <- merge(df, real_se_x20wsa25015, by=c("precip")) 
x20wsa25015_pwc_tp_15 <- merge(x20wsa25015_pwc_tp, real_se_x20wsa25015, by=c("precip", "landuse"))
x20wsa25015_pwc_tp_15 <- as.data.frame(x20wsa25015_pwc_tp_15)
x20wsa25015_pwc_tp_15$location_f =factor(x20wsa25015_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa25015_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,50)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.84)) +
  ylab("2-0.25 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+2),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa25015.png",  height=5, width=4)

5.5 20 minute 0.053 mm

5.5.1 0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
x20wsa535 <- lmer(x20wsa53 ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
anova(x20wsa535, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF  F value    Pr(>F)    
## landuse        11892.9  5946.5     2 20.8198 136.2712 1.096e-12 ***
## precip            45.9    22.9     2  8.7658   0.5255   0.60879    
## landuse:precip   631.3   157.8     4 20.8198   3.6170   0.02169 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa535_means_tp <- lsmeans(x20wsa535, ~landuse*precip, adjust="tukey")
x20wsa535_pwc_tp <- cld(x20wsa535_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa535_pwc_tp <- as.data.frame(x20wsa535_pwc_tp)

#Determining the real SE
real_se_x20wsa535 <- agg5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa53),
    sd=sd(x20wsa53)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa535 <- merge(df, real_se_x20wsa535, by=c("precip")) 
x20wsa535_pwc_tp_5 <- merge(x20wsa535_pwc_tp, real_se_x20wsa535, by=c("precip", "landuse"))
x20wsa535_pwc_tp_5 <- as.data.frame(x20wsa535_pwc_tp_5)
x20wsa535_pwc_tp_5$location_f =factor(x20wsa535_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa535_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,80)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.88,0.85)) +
  ylab("0.25-0.053 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa535.png",  height=5, width=4)

5.5.2 5-10 cm

y
## [1] "5-10 cm"
agg10$precip <- as.factor(agg10$precip)
x20wsa5310 <- lmer(x20wsa53 ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
anova(x20wsa5310, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        5648.5 2824.26     2 24.246 39.1889 2.533e-08 ***
## precip           75.7   37.83     2 16.940  0.5250  0.600891    
## landuse:precip 1338.3  334.58     4 22.291  4.6426  0.007072 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa5310_means_tp <- lsmeans(x20wsa5310, ~landuse*precip, adjust="tukey")
x20wsa5310_pwc_tp <- cld(x20wsa5310_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa5310_pwc_tp <- as.data.frame(x20wsa5310_pwc_tp)

#Determining the real SE
real_se_x20wsa5310 <- agg10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa53),
    sd=sd(x20wsa53)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa5310 <- merge(df, real_se_x20wsa5310, by=c("precip")) 
x20wsa5310_pwc_tp_10 <- merge(x20wsa5310_pwc_tp, real_se_x20wsa5310, by=c("precip", "landuse"))
x20wsa5310_pwc_tp_10 <- as.data.frame(x20wsa5310_pwc_tp_10)
x20wsa5310_pwc_tp_10$location_f =factor(x20wsa5310_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa5310_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,80)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.88,0.83)) +
  ylab("0.25-0.053 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa5310.png",  height=5, width=4)

5.5.3 10-15 cm

z
## [1] "10-15 cm"
agg15$precip <- as.factor(agg15$precip)
x20wsa5315 <- lmer(x20wsa53 ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
anova(x20wsa5315, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        5954.3 2977.14     2 22.126 25.8975 1.601e-06 ***
## precip          236.0  117.98     2 11.493  1.0263    0.3890    
## landuse:precip  588.3  147.08     4 22.126  1.2794    0.3081    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa5315_means_tp <- lsmeans(x20wsa5315, ~landuse*precip, adjust="tukey")
x20wsa5315_pwc_tp <- cld(x20wsa5315_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa5315_pwc_tp <- as.data.frame(x20wsa5315_pwc_tp)

#Determining the real SE
real_se_x20wsa5315 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa53),
    sd=sd(x20wsa53)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa5315 <- merge(df, real_se_x20wsa5315, by=c("precip")) 
x20wsa5315_pwc_tp_15 <- merge(x20wsa5315_pwc_tp, real_se_x20wsa5315, by=c("precip", "landuse"))
x20wsa5315_pwc_tp_15 <- as.data.frame(x20wsa5315_pwc_tp_15)
x20wsa5315_pwc_tp_15$location_f =factor(x20wsa5315_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa5315_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,80)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.88,0.83)) +
  ylab("0.25-0.053 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+5),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa5315.png",  height=5, width=4)

5.6 20 minute 0.02 mm

5.6.1 0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
x20wsa205 <- lmer(x20wsa20 ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
anova(x20wsa205, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        126.572  63.286     2    27 26.3225 4.548e-07 ***
## precip          14.220   7.110     2    27  2.9573   0.06897 .  
## landuse:precip   2.103   0.526     4    27  0.2187   0.92567    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa205_means_tp <- lsmeans(x20wsa205, ~landuse*precip, adjust="tukey")
x20wsa205_pwc_tp <- cld(x20wsa205_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa205_pwc_tp <- as.data.frame(x20wsa205_pwc_tp)

#Determining the real SE
real_se_x20wsa205 <- agg5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa20),
    sd=sd(x20wsa20)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa205 <- merge(df, real_se_x20wsa205, by=c("precip")) 
x20wsa205_pwc_tp_5 <- merge(x20wsa205_pwc_tp, real_se_x20wsa205, by=c("precip", "landuse"))
x20wsa205_pwc_tp_5 <- as.data.frame(x20wsa205_pwc_tp_5)
x20wsa205_pwc_tp_5$location_f =factor(x20wsa205_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa205_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab("0.053-0.02 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa205.png",  height=5, width=4)

5.6.2 5-10 cm

y
## [1] "5-10 cm"
agg10$precip <- as.factor(agg10$precip)
x20wsa2010 <- lmer(x20wsa20 ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
anova(x20wsa2010, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        79.773  39.886     2    27 22.0949 2.069e-06 ***
## precip          4.560   2.280     2    27  1.2630 0.2989752    
## landuse:precip 55.436  13.859     4    27  7.6771 0.0002882 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa2010_means_tp <- lsmeans(x20wsa2010, ~landuse*precip, adjust="tukey")
x20wsa2010_pwc_tp <- cld(x20wsa2010_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa2010_pwc_tp <- as.data.frame(x20wsa2010_pwc_tp)

#Determining the real SE
real_se_x20wsa2010 <- agg10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa20),
    sd=sd(x20wsa20)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa2010 <- merge(df, real_se_x20wsa2010, by=c("precip")) 
x20wsa2010_pwc_tp_10 <- merge(x20wsa2010_pwc_tp, real_se_x20wsa2010, by=c("precip", "landuse"))
x20wsa2010_pwc_tp_10 <- as.data.frame(x20wsa2010_pwc_tp_10)
x20wsa2010_pwc_tp_10$location_f =factor(x20wsa2010_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa2010_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab("0.053-0.02 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa2010.png",  height=5, width=4)

5.6.3 10-15 cm

z
## [1] "10-15 cm"
agg15$precip <- as.factor(agg15$precip)
x20wsa2015 <- lmer(x20wsa20 ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
anova(x20wsa2015, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse        157.687  78.844     2 18.9916 21.2369 1.434e-05 ***
## precip           9.154   4.577     2  6.5278  1.2328   0.35141    
## landuse:precip  50.755  12.689     4 18.9916  3.4178   0.02888 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
x20wsa2015_means_tp <- lsmeans(x20wsa2015, ~landuse*precip, adjust="tukey")
x20wsa2015_pwc_tp <- cld(x20wsa2015_means_tp, adjust = "none", Letters = letters, reversed = T)
x20wsa2015_pwc_tp <- as.data.frame(x20wsa2015_pwc_tp)

#Determining the real SE
real_se_x20wsa2015 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(x20wsa20),
    sd=sd(x20wsa20)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_x20wsa2015 <- merge(df, real_se_x20wsa2015, by=c("precip")) 
x20wsa2015_pwc_tp_15 <- merge(x20wsa2015_pwc_tp, real_se_x20wsa2015, by=c("precip", "landuse"))
x20wsa2015_pwc_tp_15 <- as.data.frame(x20wsa2015_pwc_tp_15)
x20wsa2015_pwc_tp_15$location_f =factor(x20wsa2015_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=x20wsa2015_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,15)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab("0.053-0.02 mm WSA (%)") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3x20wsa2015.png",  height=5, width=4)

5.7 Bulk Density

5.7.1 0-5 cm

x
## [1] "0-5 cm"
agg5$precip <- as.factor(agg5$precip)
bd5 <- lmer(bd ~ landuse*precip + (1|replication), data=agg5, na.action=na.omit)
anova(bd5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq  Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        0.44728 0.223640     2 21.053 15.2062 8.195e-05 ***
## precip         0.09899 0.049496     2  8.869  3.3654   0.08174 .  
## landuse:precip 0.14835 0.037088     4 21.053  2.5218   0.07159 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
bd5_means_tp <- lsmeans(bd5, ~landuse*precip, adjust="tukey")
bd5_pwc_tp <- cld(bd5_means_tp, adjust = "none", Letters = letters, reversed = T)
bd5_pwc_tp <- as.data.frame(bd5_pwc_tp)

#Determining the real SE
real_se_bd5 <- agg5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(bd),
    sd=sd(bd)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_bd5 <- merge(df, real_se_bd5, by=c("precip")) 
bd5_pwc_tp_5 <- merge(bd5_pwc_tp, real_se_bd5, by=c("precip", "landuse"))
bd5_pwc_tp_5 <- as.data.frame(bd5_pwc_tp_5)
bd5_pwc_tp_5$location_f =factor(bd5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=bd5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  xlab("")+
  ggtitle("A) 0-5 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.20,0.85)) +
  ylab(expression(Bulk ~Density ~(g ~cm^{-3} )))  +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label=""))) 
## Warning: Ignoring unknown parameters: font

ggsave("3bd5.png",  height=5, width=4)

5.7.2 5-10 cm

x
## [1] "0-5 cm"
agg10$precip <- as.factor(agg10$precip)
bd10 <- lmer(bd ~ landuse*precip + (1|replication), data=agg10, na.action=na.omit)
anova(bd10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq  Mean Sq NumDF DenDF F value  Pr(>F)   
## landuse        0.11373 0.056865     2    27  2.6146 0.09163 . 
## precip         0.33462 0.167312     2    27  7.6928 0.00227 **
## landuse:precip 0.02260 0.005651     4    27  0.2598 0.90108   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
bd10_means_tp <- lsmeans(bd10, ~landuse*precip, adjust="tukey")
bd10_pwc_tp <- cld(bd10_means_tp, adjust = "none", Letters = letters, reversed = T)
bd10_pwc_tp <- as.data.frame(bd10_pwc_tp)

#Determining the real SE
real_se_bd10 <- agg10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(bd),
    sd=sd(bd)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_bd10 <- merge(df, real_se_bd10, by=c("precip")) 
bd10_pwc_tp_10 <- merge(bd10_pwc_tp, real_se_bd10, by=c("precip", "landuse"))
bd10_pwc_tp_10 <- as.data.frame(bd10_pwc_tp_10)
bd10_pwc_tp_10$location_f =factor(bd10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=bd10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.20,0.85)) +
  ylab(expression(Bulk ~Density ~(g ~cm^{-3} )))  +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))  
## Warning: Ignoring unknown parameters: font

ggsave("3bd10.png",  height=5, width=4)

5.7.3 10-15 cm

x
## [1] "0-5 cm"
agg15$precip <- as.factor(agg15$precip)
bd15 <- lmer(bd ~ landuse*precip + (1|replication), data=agg15, na.action=na.omit)
anova(bd15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        0.262522 0.131261     2 20.198 11.7410 0.0004141 ***
## precip         0.056662 0.028331     2  7.889  2.5342 0.1412492    
## landuse:precip 0.046748 0.011687     4 20.198  1.0454 0.4085546    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
bd15_means_tp <- lsmeans(bd15, ~landuse*precip, adjust="tukey")
bd15_pwc_tp <- cld(bd15_means_tp, adjust = "none", Letters = letters, reversed = T)
bd15_pwc_tp <- as.data.frame(bd15_pwc_tp)

#Determining the real SE
real_se_bd15 <- agg15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(bd),
    sd=sd(bd)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_bd15 <- merge(df, real_se_bd15, by=c("precip")) 
bd15_pwc_tp_15 <- merge(bd15_pwc_tp, real_se_bd15, by=c("precip", "landuse"))
bd15_pwc_tp_15 <- as.data.frame(bd15_pwc_tp_15)
bd15_pwc_tp_15$location_f =factor(bd15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=bd15_pwc_tp_15, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  xlab("")+
  ggtitle("C) 10-15 cm") +
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(.2,0.85)) +
  ylab(expression(Bulk ~Density ~(g ~cm^{-3} )))  +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))   
## Warning: Ignoring unknown parameters: font

ggsave("3bd15.png",  height=5, width=4)

6 Ratio Graphs

6.1 Total Organic Carbon to Nitrogen

6.1.1 0-5 cm

x
## [1] "0-5 cm"
nut5$precip <- as.factor(nut5$precip)
cn5 <- lmer(cn ~ landuse*precip + (1|replication), data=nut5, na.action=na.omit) 
anova(cn5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        44.964 22.4819     2    27 26.3061 4.573e-07 ***
## precip         16.800  8.3998     2    27  9.8286 0.0006209 ***
## landuse:precip 23.213  5.8032     4    27  6.7903 0.0006442 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cn5_means_tp <- lsmeans(cn5, ~landuse*precip, adjust="tukey")
cn5_pwc_tp <- cld(cn5_means_tp, adjust = "none", Letters = letters, reversed = T)
cn5_pwc_tp <- as.data.frame(cn5_pwc_tp)

#Determining the real SE
real_se_cn5 <- nut5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(cn),
    sd=sd(cn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_cn5 <- merge(df, real_se_cn5, by=c("precip")) 
cn5_pwc_tp_5 <- merge(cn5_pwc_tp, real_se_cn5, by=c("precip", "landuse"))
cn5_pwc_tp_5 <- as.data.frame(cn5_pwc_tp_5)
cn5_pwc_tp_5$location_f =factor(cn5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=cn5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,20)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="C to N ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3soctn5.png",  height=5, width=4)

6.1.2 5-10 cm

y
## [1] "5-10 cm"
nut10$precip <- as.factor(nut10$precip)
cn10 <- lmer(cn ~ landuse*precip + (1|replication), data=nut10, na.action=na.omit) 
anova(cn10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        20.486 10.2430     2    27 14.4440 5.428e-05 ***
## precip         31.759 15.8793     2    27 22.3919 1.849e-06 ***
## landuse:precip 15.782  3.9456     4    27  5.5638  0.002121 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cn10_means_tp <- lsmeans(cn10 , ~landuse*precip, adjust="tukey")
cn10_pwc_tp <- cld(cn10_means_tp, adjust = "none", Letters = letters, reversed = T)
cn10_pwc_tp <- as.data.frame(cn10_pwc_tp)

#Determining the real SE
real_se_cn10 <- nut10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(cn),
    sd=sd(cn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_cn10 <- merge(df, real_se_cn10, by=c("precip")) 
cn10_pwc_tp_10 <- merge(cn10_pwc_tp, real_se_cn10, by=c("precip", "landuse"))
cn10_pwc_tp_10 <- as.data.frame(cn10_pwc_tp_10)
cn10_pwc_tp_10$location_f =factor(cn10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=cn10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,20)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="C to N ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3soctn10.png",  height=5, width=4)

6.1.3 10-15 cm

z
## [1] "10-15 cm"
nut15$precip <- as.factor(nut15$precip)
cn15 <- lmer(cn ~ landuse*precip + (1|replication), data=nut15, na.action=na.omit) 
anova(cn15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        13.546   6.773     2 22.366  8.9978  0.001358 ** 
## precip         69.479  34.740     2 11.905 46.1500 2.465e-06 ***
## landuse:precip  4.047   1.012     4 22.366  1.3442  0.284713    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cn15_means_tp <- lsmeans(cn15, ~landuse*precip, adjust="tukey")
cn15_pwc_tp <- cld(cn15_means_tp, adjust = "none", Letters = letters, reversed = T)
cn15_pwc_tp <- as.data.frame(cn15_pwc_tp)

#Determining the real SE
real_se_cn15 <- nut15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(cn),
    sd=sd(cn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_cn15 <- merge(df, real_se_cn15, by=c("precip")) 
cn15_pwc_tp_15 <- merge(cn15_pwc_tp, real_se_cn15, by=c("precip", "landuse"))
cn15_pwc_tp_15 <- as.data.frame(cn15_pwc_tp_15)
cn15_pwc_tp_15$location_f =factor(cn15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=cn15_pwc_tp_15, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,20)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  ylab("C to N ratio")+
  geom_label(aes(label=trimws(.group), y = lsmean+se+1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3soctn15.png",  height=5, width=4)

6.2 Protein to Total Nitrogen

6.2.1 0-5 cm

x
## [1] "0-5 cm"
ratio5$precip <- as.factor(ratio5$precip)
ptn5 <- lmer(ptn ~ landuse*precip + (1|replication), data=ratio5, na.action=na.omit) 
anova(ptn5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse         58633   29316     2 21.762  8.1896 0.0022303 ** 
## precip          96921   48461     2 11.712 13.5374 0.0009008 ***
## landuse:precip 142519   35630     4 21.762  9.9531 9.773e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ptn5_means_tp <- lsmeans(ptn5 , ~landuse*precip, adjust="tukey")
ptn5_pwc_tp <- cld(ptn5_means_tp, adjust = "none", Letters = letters, reversed = T)
ptn5_pwc_tp <- as.data.frame(ptn5_pwc_tp)

#Determining the real SE
real_se_ptn5 <- ratio5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ptn),
    sd=sd(ptn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ptn5 <- merge(df, real_se_ptn5, by=c("precip")) 
ptn5_pwc_tp_5 <- merge(ptn5_pwc_tp, real_se_ptn5, by=c("precip", "landuse"))
ptn5_pwc_tp_5 <- as.data.frame(ptn5_pwc_tp_5)
ptn5_pwc_tp_5$location_f =factor(ptn5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ptn5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 500)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab("Protein to Nitrogen ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+20),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ptn5.png",  height=5, width=4)

6.2.2 5-10 cm

y
## [1] "5-10 cm"
ratio10$precip <- as.factor(ratio10$precip)
ptn10 <- lmer(ptn ~ landuse*precip + (1|replication), data=ratio10, na.action=na.omit) 
anova(ptn10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF   DenDF F value    Pr(>F)    
## landuse          1495   747.4     2 20.5823  0.8026 0.4617059    
## precip          25650 12825.2     2  9.8214 13.7729 0.0014133 ** 
## landuse:precip  41700 10425.0     4 17.0349 11.1954 0.0001224 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ptn10_means_tp <- lsmeans(ptn10 , ~landuse*precip, adjust="tukey")
ptn10_pwc_tp <- cld(ptn10_means_tp, adjust = "none", Letters = letters, reversed = T)
ptn10_pwc_tp <- as.data.frame(ptn10_pwc_tp)

#Determining the real SE
real_se_ptn10 <- ratio10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ptn),
    sd=sd(ptn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ptn10 <- merge(df, real_se_ptn10, by=c("precip")) 
ptn10_pwc_tp_10 <- merge(ptn10_pwc_tp, real_se_ptn10, by=c("precip", "landuse"))
ptn10_pwc_tp_10 <- as.data.frame(ptn10_pwc_tp_10)
ptn10_pwc_tp_10$location_f =factor(ptn10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ptn10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,500)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.5,0.85)) +
  labs( y="Protein to Nitrogen ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+20),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ptn10.png",  height=5, width=4)

6.2.3 10-15 cm

z
## [1] "10-15 cm"
ratio15$precip <- as.factor(ratio15$precip)
ptn15 <- lmer(ptn ~ landuse*precip + (1|replication), data=ratio15, na.action=na.omit) 
anova(ptn15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF   DenDF F value   Pr(>F)   
## landuse        23736.5 11868.3     2 17.2239  9.5046 0.001654 **
## precip          2351.2  1175.6     2  5.2703  0.9415 0.447093   
## landuse:precip 17312.7  4328.2     4 17.2239  3.4662 0.029937 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
ptn15_means_tp <- lsmeans(ptn15 , ~landuse*precip, adjust="tukey")
ptn15_pwc_tp <- cld(ptn15_means_tp, adjust = "none", Letters = letters, reversed = T)
ptn15_pwc_tp <- as.data.frame(ptn15_pwc_tp)

#Determining the real SE
real_se_ptn15 <- ratio15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(ptn),
    sd=sd(ptn)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_ptn15 <- merge(df, real_se_ptn15, by=c("precip")) 
ptn15_pwc_tp_15 <- merge(ptn15_pwc_tp, real_se_ptn15, by=c("precip", "landuse"))
ptn15_pwc_tp_15 <- as.data.frame(ptn15_pwc_tp_15)
ptn15_pwc_tp_15$location_f =factor(ptn15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=ptn15_pwc_tp_15, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 500)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
    ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab("Protein to Nitrogen ratio")+
  geom_label(aes(label=trimws(.group), y = lsmean+se+20),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3ptn15.png",  height=5, width=4)

6.3 Soil Respiration to Total Organic Carbon

6.3.1 0-5 cm

x
## [1] "0-5 cm"
ratio5$precip <- as.factor(ratio5$precip)
rec5 <- lmer(rec ~ landuse*precip + (1|replication), data=ratio5, na.action=na.omit) 
anova(rec5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                   Sum Sq   Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        0.0011400 0.0005700     2 22.511  1.2587    0.3033    
## precip         0.0312701 0.0156350     2 11.831 34.5258 1.152e-05 ***
## landuse:precip 0.0021471 0.0005368     4 22.511  1.1853    0.3441    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
rec5_means_tp <- lsmeans(rec5 , ~landuse*precip, adjust="tukey")
rec5_pwc_tp <- cld(rec5_means_tp, adjust = "none", Letters = letters, reversed = T)
rec5_pwc_tp <- as.data.frame(rec5_pwc_tp)

#Determining the real SE
real_se_rec5 <- ratio5 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(rec),
    sd=sd(rec)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_rec5 <- merge(df, real_se_rec5, by=c("precip")) 
rec5_pwc_tp_5 <- merge(rec5_pwc_tp, real_se_rec5, by=c("precip", "landuse"))
rec5_pwc_tp_5 <- as.data.frame(rec5_pwc_tp_5)
rec5_pwc_tp_5$location_f =factor(rec5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=rec5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 0.20)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  ylab("Respiration to Carbon ratio")  +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.01),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3rec5.png",  height=5, width=4)

6.3.2 5-10 cm

y
## [1] "5-10 cm"
ratio10$precip <- as.factor(ratio10$precip)
rec10 <- lmer(rec ~ landuse*precip + (1|replication), data=ratio10, na.action=na.omit) 
anova(rec10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq   Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.002591 0.0012956     2    27  2.6602   0.08820 .  
## precip         0.036120 0.0180599     2    27 37.0822 1.801e-08 ***
## landuse:precip 0.004779 0.0011946     4    27  2.4529   0.07001 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
rec10_means_tp <- lsmeans(rec10 , ~landuse*precip, adjust="tukey")
rec10_pwc_tp <- cld(rec10_means_tp, adjust = "none", Letters = letters, reversed = T)
rec10_pwc_tp <- as.data.frame(rec10_pwc_tp)

#Determining the real SE
real_se_rec10 <- ratio10 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(rec),
    sd=sd(rec)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_rec10 <- merge(df, real_se_rec10, by=c("precip")) 
rec10_pwc_tp_10 <- merge(rec10_pwc_tp, real_se_rec10, by=c("precip", "landuse"))
rec10_pwc_tp_10 <- as.data.frame(rec10_pwc_tp_10)
rec10_pwc_tp_10$location_f =factor(rec10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=rec10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,.2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="Respiration to Carbon ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.01),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3rec10.png",  height=5, width=4)

6.3.3 10-15 cm

z
## [1] "10-15 cm"
ratio15$precip <- as.factor(ratio15$precip)
rec15 <- lmer(rec ~ landuse*precip + (1|replication), data=ratio15, na.action=na.omit) 
anova(rec15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                   Sum Sq   Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        0.0080775 0.0040387     2 22.574  42.497 2.221e-08 ***
## precip         0.0147424 0.0073712     2 12.049  77.561 1.314e-07 ***
## landuse:precip 0.0127194 0.0031798     4 22.574  33.459 3.460e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
rec15_means_tp <- lsmeans(rec15 , ~landuse*precip, adjust="tukey")
rec15_pwc_tp <- cld(rec15_means_tp, adjust = "none", Letters = letters, reversed = T)
rec15_pwc_tp <- as.data.frame(rec15_pwc_tp)

#Determining the real SE
real_se_rec15 <- ratio15 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(rec),
    sd=sd(rec)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_rec15 <- merge(df, real_se_rec15, by=c("precip")) 
rec15_pwc_tp_15 <- merge(rec15_pwc_tp, real_se_rec15, by=c("precip", "landuse"))
rec15_pwc_tp_15 <- as.data.frame(rec15_pwc_tp_15)
rec15_pwc_tp_15$location_f =factor(rec15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=rec15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,.2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="Respiration to Carbon ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.01),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3rec15.png",  height=5, width=4)

6.4 Glucosidase to Glucosaminidase ratio

6.4.1 0-5 cm

x
## [1] "0-5 cm"
epra25$precip <- as.factor(epra25$precip)
lngluc_glucosam5 <- lmer(lngluc_glucosam ~ landuse*precip + (1|replication), data=epra25, na.action=na.omit) 
anova(lngluc_glucosam5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.078563 0.039282     2    27  15.088 3.990e-05 ***
## precip         0.133757 0.066878     2    27  25.688 5.648e-07 ***
## landuse:precip 0.172844 0.043211     4    27  16.598 5.618e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_glucosam5_means_tp <- lsmeans(lngluc_glucosam5 , ~landuse*precip)
lngluc_glucosam5_pwc_tp <- cld(lngluc_glucosam5_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_glucosam5_pwc_tp <- as.data.frame(lngluc_glucosam5_pwc_tp)

#Determining the real SE
real_se_lngluc_glucosam5 <- epra25 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_glucosam),
    sd=sd(lngluc_glucosam)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_glucosam5 <- merge(df, real_se_lngluc_glucosam5, by=c("precip")) 
lngluc_glucosam5_pwc_tp_5 <- merge(lngluc_glucosam5_pwc_tp, real_se_lngluc_glucosam5, by=c("precip", "landuse"))
lngluc_glucosam5_pwc_tp_5 <- as.data.frame(lngluc_glucosam5_pwc_tp_5)
lngluc_glucosam5_pwc_tp_5$location_f =factor(lngluc_glucosam5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_glucosam5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 2)) +  
  xlab("")+
    ggtitle("A) 0-5 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  labs( y="ln(bG) to ln(NAG) ratio")  +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgnag5.png",  height=5, width=4)

6.4.2 5-10 cm

y
## [1] "5-10 cm"
epra210$precip <- as.factor(epra210$precip)
lngluc_glucosam10 <- lmer(lngluc_glucosam ~ landuse*precip + (1|replication), data=epra210, na.action=na.omit) 
anova(lngluc_glucosam10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF  DenDF F value   Pr(>F)   
## landuse        0.110065 0.055032     2 19.926  7.1520 0.004558 **
## precip         0.002239 0.001119     2  8.189  0.1455 0.866792   
## landuse:precip 0.153454 0.038364     4 15.734  4.9857 0.008612 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_glucosam10_means_tp <- lsmeans(lngluc_glucosam10 , ~landuse*precip)
lngluc_glucosam10_pwc_tp <- cld(lngluc_glucosam10_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_glucosam10_pwc_tp <- as.data.frame(lngluc_glucosam10_pwc_tp)

#Determining the real SE
real_se_lngluc_glucosam10 <- epra210 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_glucosam),
    sd=sd(lngluc_glucosam)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_glucosam10 <- merge(df, real_se_lngluc_glucosam10, by=c("precip")) 
lngluc_glucosam10_pwc_tp_10 <- merge(lngluc_glucosam10_pwc_tp, real_se_lngluc_glucosam10, by=c("precip", "landuse"))
lngluc_glucosam10_pwc_tp_10 <- as.data.frame(lngluc_glucosam10_pwc_tp_10)
lngluc_glucosam10_pwc_tp_10$location_f =factor(lngluc_glucosam10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_glucosam10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 2)) +  
  xlab("")+
    ggtitle("B) 5-10 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.83)) +
  labs( y="ln(bG) to ln(NAG) ratio")  +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgnag10.png",  height=5, width=4)

6.4.3 10-15 cm

z
## [1] "10-15 cm"
epra215$precip <- as.factor(epra215$precip)
lngluc_glucosam15 <- lmer(lngluc_glucosam ~ landuse*precip + (1|replication), data=epra215, na.action=na.omit) 
anova(lngluc_glucosam15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.109683 0.054841     2    27 25.7118 5.602e-07 ***
## precip         0.018770 0.009385     2    27  4.4001 0.0221805 *  
## landuse:precip 0.064712 0.016178     4    27  7.5849 0.0003126 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_glucosam15_means_tp <- lsmeans(lngluc_glucosam15 , ~landuse*precip)
lngluc_glucosam15_pwc_tp <- cld(lngluc_glucosam15_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_glucosam15_pwc_tp <- as.data.frame(lngluc_glucosam15_pwc_tp)

#Determining the real SE
real_se_lngluc_glucosam15 <- epra215 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_glucosam),
    sd=sd(lngluc_glucosam)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_glucosam15 <- merge(df, real_se_lngluc_glucosam15, by=c("precip")) 
lngluc_glucosam15_pwc_tp_15 <- merge(lngluc_glucosam15_pwc_tp, real_se_lngluc_glucosam15, by=c("precip", "landuse"))
lngluc_glucosam15_pwc_tp_15 <- as.data.frame(lngluc_glucosam15_pwc_tp_15)
lngluc_glucosam15_pwc_tp_15$location_f =factor(lngluc_glucosam15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_glucosam15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(NAG) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgnag15.png",  height=5, width=4)

6.5 Glucosidase to Acid Phosphatase ratio

6.5.1 0-5 cm

x
## [1] "0-5 cm"
epra25$precip <- as.factor(epra25$precip)
lngluc_acidp5 <- lmer(lngluc_acidp ~ landuse*precip + (1|replication), data=epra25, na.action=na.omit) 
anova(lngluc_acidp5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.076561 0.038281     2    27  35.079 3.108e-08 ***
## precip         0.074473 0.037236     2    27  34.122 4.066e-08 ***
## landuse:precip 0.168886 0.042221     4    27  38.690 8.259e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_acidp5_means_tp <- lsmeans(lngluc_acidp5 , ~landuse*precip, adjust="tukey")
lngluc_acidp5_pwc_tp <- cld(lngluc_acidp5_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_acidp5_pwc_tp <- as.data.frame(lngluc_acidp5_pwc_tp)

#Determining the real SE
real_se_lngluc_acidp5 <- epra25 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_acidp),
    sd=sd(lngluc_acidp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_acidp5 <- merge(df, real_se_lngluc_acidp5, by=c("precip")) 
lngluc_acidp5_pwc_tp_5 <- merge(lngluc_acidp5_pwc_tp, real_se_lngluc_acidp5, by=c("precip", "landuse"))
lngluc_acidp5_pwc_tp_5 <- as.data.frame(lngluc_acidp5_pwc_tp_5)
lngluc_acidp5_pwc_tp_5$location_f =factor(lngluc_acidp5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_acidp5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(AP) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgap5.png",  height=5, width=4)

6.5.2 5-10 cm

y
## [1] "5-10 cm"
epra210$precip <- as.factor(epra210$precip)
lngluc_acidp10 <- lmer(lngluc_acidp ~ landuse*precip + (1|replication), data=epra210, na.action=na.omit) 
anova(lngluc_acidp10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                 Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.07266 0.03633     2    27 11.9736 0.0001894 ***
## precip         0.02972 0.01486     2    27  4.8976 0.0153194 *  
## landuse:precip 0.12284 0.03071     4    27 10.1214 3.873e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_acidp10_means_tp <- lsmeans(lngluc_acidp10 , ~landuse*precip, adjust="tukey")
lngluc_acidp10_pwc_tp <- cld(lngluc_acidp10_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_acidp10_pwc_tp <- as.data.frame(lngluc_acidp10_pwc_tp)

#Determining the real SE
real_se_lngluc_acidp10 <- epra210 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_glucosam),
    sd=sd(lngluc_glucosam)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_acidp10 <- merge(df, real_se_lngluc_acidp10, by=c("precip")) 
lngluc_acidp10_pwc_tp_10 <- merge(lngluc_acidp10_pwc_tp, real_se_lngluc_acidp10, by=c("precip", "landuse"))
lngluc_acidp10_pwc_tp_10 <- as.data.frame(lngluc_acidp10_pwc_tp_10)
lngluc_acidp10_pwc_tp_10$location_f =factor(lngluc_acidp10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_acidp10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(AP) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgap10.png",  height=5, width=4)

6.5.3 10-15 cm

z
## [1] "10-15 cm"
epra215$precip <- as.factor(epra215$precip)
lngluc_acidp15 <- lmer(lngluc_acidp ~ landuse*precip + (1|replication), data=epra215, na.action=na.omit) 
anova(lngluc_acidp15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.029770 0.014885     2    27 12.1211 0.0001752 ***
## precip         0.050201 0.025101     2    27 20.4398 3.935e-06 ***
## landuse:precip 0.042072 0.010518     4    27  8.5649 0.0001344 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_acidp15_means_tp <- lsmeans(lngluc_acidp15 , ~landuse*precip, adjust="tukey")
lngluc_acidp15_pwc_tp <- cld(lngluc_acidp15_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_acidp15_pwc_tp <- as.data.frame(lngluc_acidp15_pwc_tp)

#Determining the real SE
real_se_lngluc_acidp15 <- epra215 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_glucosam),
    sd=sd(lngluc_glucosam)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_acidp15 <- merge(df, real_se_lngluc_acidp15, by=c("precip")) 
lngluc_acidp15_pwc_tp_15 <- merge(lngluc_acidp15_pwc_tp, real_se_lngluc_acidp15, by=c("precip", "landuse"))
lngluc_acidp15_pwc_tp_15 <- as.data.frame(lngluc_acidp15_pwc_tp_15)
lngluc_acidp15_pwc_tp_15$location_f =factor(lngluc_acidp15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_acidp15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(AP) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgap15.png",  height=5, width=4)

6.6 Glucosidase to Alkaline Phosphatase ratio

6.6.1 0-5 cm

x
## [1] "0-5 cm"
epra25$precip <- as.factor(epra25$precip)
lngluc_alkp5 <- lmer(lngluc_alkp ~ landuse*precip + (1|replication), data=epra25, na.action=na.omit) 
anova(lngluc_alkp5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq   Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.051416 0.0257081     2    27 24.5570 8.388e-07 ***
## precip         0.031808 0.0159040     2    27 15.1919 3.800e-05 ***
## landuse:precip 0.024029 0.0060073     4    27  5.7383   0.00178 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_alkp5_means_tp <- lsmeans(lngluc_alkp5 , ~landuse*precip, adjust="tukey")
lngluc_alkp5_pwc_tp <- cld(lngluc_alkp5_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_alkp5_pwc_tp <- as.data.frame(lngluc_alkp5_pwc_tp)

#Determining the real SE
real_se_lngluc_alkp5 <- epra25 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_alkp),
    sd=sd(lngluc_alkp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_alkp5 <- merge(df, real_se_lngluc_alkp5, by=c("precip")) 
lngluc_alkp5_pwc_tp_5 <- merge(lngluc_alkp5_pwc_tp, real_se_lngluc_alkp5, by=c("precip", "landuse"))
lngluc_alkp5_pwc_tp_5 <- as.data.frame(lngluc_alkp5_pwc_tp_5)
lngluc_alkp5_pwc_tp_5$location_f =factor(lngluc_alkp5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_alkp5_pwc_tp_5, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(ALP) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgalk5.png",  height=5, width=4)

6.6.2 5-10 cm

y
## [1] "5-10 cm"
epra210$precip <- as.factor(epra210$precip)
lngluc_alkp10 <- lmer(lngluc_alkp ~ landuse*precip + (1|replication), data=epra210, na.action=na.omit) 
anova(lngluc_alkp10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.098071 0.049036     2    27 21.8345 2.285e-06 ***
## precip         0.035142 0.017571     2    27  7.8240 0.0020882 ** 
## landuse:precip 0.068340 0.017085     4    27  7.6077 0.0003064 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_alkp10_means_tp <- lsmeans(lngluc_alkp10 , ~landuse*precip, adjust="tukey")
lngluc_alkp10_pwc_tp <- cld(lngluc_alkp10_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_alkp10_pwc_tp <- as.data.frame(lngluc_alkp10_pwc_tp)

#Determining the real SE
real_se_lngluc_alkp10 <- epra210 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_alkp),
    sd=sd(lngluc_alkp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_alkp10 <- merge(df, real_se_lngluc_alkp10, by=c("precip")) 
lngluc_alkp10_pwc_tp_10 <- merge(lngluc_alkp10_pwc_tp, real_se_lngluc_alkp10, by=c("precip", "landuse"))
lngluc_alkp10_pwc_tp_10 <- as.data.frame(lngluc_alkp10_pwc_tp_10)
lngluc_alkp10_pwc_tp_10$location_f =factor(lngluc_alkp10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_alkp10_pwc_tp_10, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(ALP) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgalk10.png",  height=5, width=4)

6.6.3 10-15 cm

z
## [1] "10-15 cm"
epra215$precip <- as.factor(epra215$precip)
lngluc_alkp15 <- lmer(lngluc_alkp ~ landuse*precip + (1|replication), data=epra215, na.action=na.omit) 
anova(lngluc_alkp15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.022719 0.011359     2    27  4.5066 0.0204733 *  
## precip         0.060156 0.030078     2    27 11.9328 0.0001935 ***
## landuse:precip 0.090574 0.022644     4    27  8.9833 9.516e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_alkp15_means_tp <- lsmeans(lngluc_alkp15 , ~landuse*precip, adjust="tukey")
lngluc_alkp15_pwc_tp <- cld(lngluc_alkp15_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_alkp15_pwc_tp <- as.data.frame(lngluc_alkp15_pwc_tp)

#Determining the real SE
real_se_lngluc_alkp15 <- epra215 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_alkp),
    sd=sd(lngluc_alkp)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_alkp15 <- merge(df, real_se_lngluc_alkp15, by=c("precip")) 
lngluc_alkp15_pwc_tp_15 <- merge(lngluc_alkp15_pwc_tp, real_se_lngluc_alkp15, by=c("precip", "landuse"))
lngluc_alkp15_pwc_tp_15 <- as.data.frame(lngluc_alkp15_pwc_tp_15)
lngluc_alkp15_pwc_tp_15$location_f =factor(lngluc_alkp15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_alkp15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(ALP) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgalk15.png",  height=5, width=4)

6.7 Glucosidase to Arylsulfatase ratio

6.7.1 0-5 cm

x
## [1] "0-5 cm"
epra25$precip <- as.factor(epra25$precip)
lngluc_ary5 <- lmer(lngluc_ary ~ landuse*precip + (1|replication), data=epra25, na.action=na.omit) 
anova(lngluc_ary5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                Sum Sq Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        2.2637 1.13186     2    27  9.1510 0.0009243 ***
## precip         1.6792 0.83959     2    27  6.7880 0.0040905 ** 
## landuse:precip 1.4799 0.36997     4    27  2.9912 0.0363706 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_ary5_means_tp <- lsmeans(lngluc_ary5 , ~landuse*precip, adjust="tukey")
lngluc_ary5_pwc_tp <- cld(lngluc_ary5_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_ary5_pwc_tp <- as.data.frame(lngluc_ary5_pwc_tp)

#Determining the real SE
real_se_lngluc_ary5 <- epra25 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_ary),
    sd=sd(lngluc_ary)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_ary5 <- merge(df, real_se_lngluc_ary5, by=c("precip")) 
lngluc_ary5_pwc_tp_5 <- merge(lngluc_ary5_pwc_tp, real_se_lngluc_ary5, by=c("precip", "landuse"))
lngluc_ary5_pwc_tp_5 <- as.data.frame(lngluc_ary5_pwc_tp_5)
lngluc_ary5_pwc_tp_5$location_f =factor(lngluc_ary5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_ary5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 3)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.2,0.83)) +
  ylab("ln(bG) to ln(ARY) ratio")+
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgary5.png",  height=5, width=4)

6.7.2 5-10 cm

epra210$precip <- as.factor(epra210$precip)
lngluc_ary10 <- lmer(lngluc_ary ~ landuse*precip + (1|replication), data=epra210, na.action=na.omit) 
anova(lngluc_ary10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value  Pr(>F)  
## landuse        0.301550 0.150775     2    27  3.0980 0.06148 .
## precip         0.066458 0.033229     2    27  0.6828 0.51373  
## landuse:precip 0.217481 0.054370     4    27  1.1171 0.36898  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_ary10_means_tp <- lsmeans(lngluc_ary10 , ~landuse*precip, adjust="tukey")
lngluc_ary10_pwc_tp <- cld(lngluc_ary10_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_ary10_pwc_tp <- as.data.frame(lngluc_ary10_pwc_tp)

#Determining the real SE
real_se_lngluc_ary10 <- epra210 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_ary),
    sd=sd(lngluc_ary)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_ary10 <- merge(df, real_se_lngluc_ary10, by=c("precip")) 
lngluc_ary10_pwc_tp_10 <- merge(lngluc_ary10_pwc_tp, real_se_lngluc_ary10, by=c("precip", "landuse"))
lngluc_ary10_pwc_tp_10 <- as.data.frame(lngluc_ary10_pwc_tp_10)
lngluc_ary10_pwc_tp_10$location_f =factor(lngluc_ary10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_ary10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 2)) +  
  xlab("")+
    ggtitle("B) 5-10 cm")+ 
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.2,0.83)) +
  ylab("ln(bG) to ln(ARY) ratio")+
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgary10.png",  height=5, width=4)

6.7.3 10-15 cm

z
## [1] "10-15 cm"
epra215$precip <- as.factor(epra215$precip)
lngluc_ary15 <- lmer(lngluc_ary ~ landuse*precip + (1|replication), data=epra215, na.action=na.omit) 
anova(lngluc_ary15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.173416 0.086708     2    27 30.4426 1.204e-07 ***
## precip         0.079514 0.039757     2    27 13.9585 6.877e-05 ***
## landuse:precip 0.040865 0.010216     4    27  3.5869   0.01803 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_ary15_means_tp <- lsmeans(lngluc_ary15 , ~landuse*precip, adjust="tukey")
lngluc_ary15_pwc_tp <- cld(lngluc_ary15_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_ary15_pwc_tp <- as.data.frame(lngluc_ary15_pwc_tp)

#Determining the real SE
real_se_lngluc_ary15 <- epra215 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_ary),
    sd=sd(lngluc_ary)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_ary15 <- merge(df, real_se_lngluc_ary15, by=c("precip")) 
lngluc_ary15_pwc_tp_15 <- merge(lngluc_ary15_pwc_tp, real_se_lngluc_ary15, by=c("precip", "landuse"))
lngluc_ary15_pwc_tp_15 <- as.data.frame(lngluc_ary15_pwc_tp_15)
lngluc_ary15_pwc_tp_15$location_f =factor(lngluc_ary15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_ary15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(ARY) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA, label.size = NA, fill=NA, font="bold" ) +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgary15.png",  height=5, width=4)

6.8 Glucosidase to Phosphodiesterase ratio

6.8.1 0-5 cm

x
## [1] "0-5 cm"
epra25$precip <- as.factor(epra25$precip)
lngluc_pho5 <- lmer(lngluc_pho ~ landuse*precip + (1|replication), data=epra25, na.action=na.omit) 
anova(lngluc_pho5, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF DenDF F value   Pr(>F)   
## landuse        0.096133 0.048066     2    27  8.9888 0.001018 **
## precip         0.065483 0.032742     2    27  6.1230 0.006415 **
## landuse:precip 0.007623 0.001906     4    27  0.3564 0.837285   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_pho5_means_tp <- lsmeans(lngluc_pho5 , ~landuse*precip, adjust="tukey")
lngluc_pho5_pwc_tp <- cld(lngluc_pho5_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_pho5_pwc_tp <- as.data.frame(lngluc_pho5_pwc_tp)

#Determining the real SE
real_se_lngluc_pho5 <- epra25 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_pho),
    sd=sd(lngluc_pho)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_pho5 <- merge(df, real_se_lngluc_pho5, by=c("precip")) 
lngluc_pho5_pwc_tp_5 <- merge(lngluc_pho5_pwc_tp, real_se_lngluc_pho5, by=c("precip", "landuse"))
lngluc_pho5_pwc_tp_5 <- as.data.frame(lngluc_pho5_pwc_tp_5)
lngluc_pho5_pwc_tp_5$location_f =factor(lngluc_pho5_pwc_tp_5$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_pho5_pwc_tp_5, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 2)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("A) 0-5 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.2,0.83)) +
  ylab("ln(bG) to ln(PHO) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgpho5.png",  height=5, width=4)

6.8.2 5-10 cm

y
## [1] "5-10 cm"
epra210$precip <- as.factor(epra210$precip)
lngluc_pho10 <- lmer(lngluc_pho ~ landuse*precip + (1|replication), data=epra210, na.action=na.omit) 
anova(lngluc_pho10, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq  Mean Sq NumDF  DenDF F value    Pr(>F)    
## landuse        0.066336 0.033168     2 20.918 11.0506 0.0005307 ***
## precip         0.102891 0.051445     2 16.669 17.1400 9.034e-05 ***
## landuse:precip 0.030904 0.007726     4 19.558  2.5741 0.0699051 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_pho10_means_tp <- lsmeans(lngluc_pho10 , ~landuse*precip, adjust="tukey")
lngluc_pho10_pwc_tp <- cld(lngluc_pho10_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_pho10_pwc_tp <- as.data.frame(lngluc_pho10_pwc_tp)

#Determining the real SE
real_se_lngluc_pho10 <- epra210 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_pho),
    sd=sd(lngluc_pho)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_pho10 <- merge(df, real_se_lngluc_pho10, by=c("precip")) 
lngluc_pho10_pwc_tp_10 <- merge(lngluc_pho10_pwc_tp, real_se_lngluc_pho10, by=c("precip", "landuse"))
lngluc_pho10_pwc_tp_10 <- as.data.frame(lngluc_pho10_pwc_tp_10)
lngluc_pho10_pwc_tp_10$location_f =factor(lngluc_pho10_pwc_tp_10$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_pho10_pwc_tp_10, aes(x=landuse, y=mean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=mean-se, ymax=mean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0, 2)) +  
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("B) 5-10 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.2,0.83)) +
  ylab("ln(bG) to ln(PHO) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgpho10.png",  height=5, width=4)

6.8.3 10-15 cm

z
## [1] "10-15 cm"
epra215$precip <- as.factor(epra215$precip)
lngluc_pho15 <- lmer(lngluc_pho ~ landuse*precip + (1|replication), data=epra215, na.action=na.omit) 
anova(lngluc_pho15, type=3)
## Type III Analysis of Variance Table with Satterthwaite's method
##                  Sum Sq   Mean Sq NumDF DenDF F value    Pr(>F)    
## landuse        0.009655 0.0048277     2    27  2.0485 0.1485011    
## precip         0.045578 0.0227891     2    27  9.6697 0.0006809 ***
## landuse:precip 0.051612 0.0129030     4    27  5.4749 0.0023213 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
lngluc_pho15_means_tp <- lsmeans(lngluc_pho15 , ~landuse*precip, adjust="tukey")
lngluc_pho15_pwc_tp <- cld(lngluc_pho15_means_tp, adjust = "none", Letters = letters, reversed = T)
lngluc_pho15_pwc_tp <- as.data.frame(lngluc_pho15_pwc_tp)

#Determining the real SE
real_se_lngluc_pho15 <- epra215 %>%
  dplyr::group_by(precip, landuse) %>%
  dplyr::summarise( 
    n=n(),
    mean=mean(lngluc_pho),
    sd=sd(lngluc_pho)
  ) %>%
  dplyr::mutate( se=sd/sqrt(n))

real_se_lngluc_pho15 <- merge(df, real_se_lngluc_pho15, by=c("precip")) 
lngluc_pho15_pwc_tp_15 <- merge(lngluc_pho15_pwc_tp, real_se_lngluc_pho15, by=c("precip", "landuse"))
lngluc_pho15_pwc_tp_15 <- as.data.frame(lngluc_pho15_pwc_tp_15)
lngluc_pho15_pwc_tp_15$location_f =factor(lngluc_pho15_pwc_tp_15$location, levels=c('Tribune', 'Hays', 'Manhattan'))

ggplot(data=lngluc_pho15_pwc_tp_15, aes(x=landuse, y=lsmean, fill = landuse)) + 
  geom_bar(position=position_dodge(), stat="identity", colour = "black") +
  geom_errorbar(aes(ymin=lsmean-se, ymax=lsmean+se),
                width=.2,                    # Width of the error bars
                position=position_dodge(.9)) + 
  scale_y_continuous(limits=c(0,2)) +  
  facet_wrap(facets=vars(location_f), strip.position="bottom")  +
  xlab("")+
  facet_wrap(facets=vars(location_f), strip.position="bottom")  + 
  scale_fill_manual(values = colbio) + 
  ggtitle("C) 10-15 cm")+ 
  theme_James() + 
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
        panel.background = element_blank(), axis.line = element_line(colour = "black"),
        panel.border = element_rect(colour = "black", fill=NA, size=0.5),
        strip.background=element_rect(size=0.5, colour = "black"),
        axis.text.x=element_blank(),
        axis.ticks.x=element_blank(),
        legend.position= c(0.12,0.85)) +
  labs( y="ln(bG) to ln(PHO) ratio") +
  geom_label(aes(label=trimws(.group), y = lsmean+se+.1),
             label.padding = unit(.3,"lines"), show.legend=NA , label.size = NA, fill=NA, font="bold") +
  guides(fill = guide_legend(override.aes = aes(label="")))
## Warning: Ignoring unknown parameters: font

ggsave("3bgpho15.png",  height=5, width=4)