A pipeline for evaluating the PS2 data from Sarah Kezar’s experiment This is a part of a series of experiments on Parthenium sp. from various locations.

PS2 data loading

OK - now let’s explore whats happening in the PS2 data!

Because the original output file is having some nonsense lines as we export it from the PS2 analyzer - we need to remove them:

PS2a <- read.csv("Batch.04.PS2.csv")
PS2b <- read.csv("Batch.03.2.PS2.csv")
colnames(PS2a)
##  [1] "File"           "Date"           "Time"           "Obj.No"        
##  [5] "nTmPam"         "Obj.Size"       "Obj.Xc"         "Obj.Yc"        
##  [9] "Fv.Fm"          "s.d."           "Fq..Fm."        "s.d..1"        
## [13] "NPQ"            "s.d..2"         "F0."            "s.d..3"        
## [17] "qP"             "s.d..4"         "qN"             "s.d..5"        
## [21] "qL"             "s.d..6"         "qE"             "s.d..7"        
## [25] "qI"             "s.d..8"         "X.Ñno"          "s.d..9"        
## [29] "X.Ñnpq"         "s.d..10"        "npq.t."         "s.d..11"       
## [33] "ChlIdx"         "s.d..12"        "AriIdx"         "s.d..13"       
## [37] "NDVI"           "s.d..14"        "Border"         "Mask.Border"   
## [41] "Points"         "Area..CH."      "Mask.Area..CH." "X.Centre"      
## [45] "Y.Centre"       "Radius"         "Area..MC."      "Mask.Area..MC."
## [49] "Width"          "Height"         "Area..MR."      "Mask.Area..MR."
## [53] "Alpha"          "Size..SK."      "Junction..SK."  "Endpoint..SK." 
## [57] "Path..SK."
colnames(PS2b)
##  [1] "File"           "Date"           "Time"           "Obj.No"        
##  [5] "nTmPam"         "Obj.Size"       "Obj.Xc"         "Obj.Yc"        
##  [9] "Fv.Fm"          "s.d."           "Fq..Fm."        "s.d..1"        
## [13] "NPQ"            "s.d..2"         "F0."            "s.d..3"        
## [17] "qP"             "s.d..4"         "qN"             "s.d..5"        
## [21] "qL"             "s.d..6"         "qE"             "s.d..7"        
## [25] "qI"             "s.d..8"         "X.Ñno"          "s.d..9"        
## [29] "X.Ñnpq"         "s.d..10"        "npq.t."         "s.d..11"       
## [33] "ChlIdx"         "s.d..12"        "AriIdx"         "s.d..13"       
## [37] "NDVI"           "s.d..14"        "Border"         "Mask.Border"   
## [41] "Points"         "Area..CH."      "Mask.Area..CH." "X.Centre"      
## [45] "Y.Centre"       "Radius"         "Area..MC."      "Mask.Area..MC."
## [49] "Width"          "Height"         "Area..MR."      "Mask.Area..MR."
## [53] "Alpha"          "Size..SK."      "Junction..SK."  "Endpoint..SK." 
## [57] "Path..SK."
PS2 <- rbind(PS2a, PS2b)
PS2

For this specific experiment - in order to analyze the results per OVERALL canopy - let’s keep ONLY “all”

PS3 <- subset(PS2, PS2$Obj.No == "All")
PS3

get only the columns that are informative biologically (for now):

colnames(PS3)
##  [1] "File"           "Date"           "Time"           "Obj.No"        
##  [5] "nTmPam"         "Obj.Size"       "Obj.Xc"         "Obj.Yc"        
##  [9] "Fv.Fm"          "s.d."           "Fq..Fm."        "s.d..1"        
## [13] "NPQ"            "s.d..2"         "F0."            "s.d..3"        
## [17] "qP"             "s.d..4"         "qN"             "s.d..5"        
## [21] "qL"             "s.d..6"         "qE"             "s.d..7"        
## [25] "qI"             "s.d..8"         "X.Ñno"          "s.d..9"        
## [29] "X.Ñnpq"         "s.d..10"        "npq.t."         "s.d..11"       
## [33] "ChlIdx"         "s.d..12"        "AriIdx"         "s.d..13"       
## [37] "NDVI"           "s.d..14"        "Border"         "Mask.Border"   
## [41] "Points"         "Area..CH."      "Mask.Area..CH." "X.Centre"      
## [45] "Y.Centre"       "Radius"         "Area..MC."      "Mask.Area..MC."
## [49] "Width"          "Height"         "Area..MR."      "Mask.Area..MR."
## [53] "Alpha"          "Size..SK."      "Junction..SK."  "Endpoint..SK." 
## [57] "Path..SK."
PS4 <- PS3[,c(1:3, 6, 9, 11, 13, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37)]
PS4
library(ggplot2)
library(ggpubr)
PS4$Date <- as.factor(PS4$Date)
lgraph <- ggplot(data=PS4, aes(x= Date, y=ChlIdx)) 
lgraph <- lgraph + geom_point(alpha = 0.7) + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
lgraph <- lgraph + ylab("Chlorophylll Index") + xlab("days after stress")
lgraph

OK - so this dataset contains actually three experiments - batch 04 from Sarah’s experiment from March 18th to 31st - then batch 03.2 from Sarah’s experiment from March 31st to April 09

Let’s isolate only the measurement from batch 3.2:

want <- c("20250331", "20250401", "20250402", "20250403", "20250404", "20250405", "20250406", "20250407", "20250408", "20250409")

PS4 <- subset(PS4, PS4$Date %in% want)

lgraph <- ggplot(data=PS4, aes(x= Date, y=ChlIdx)) 
lgraph <- lgraph + geom_point(alpha = 0.7) + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
lgraph <- lgraph + ylab("Chlorophylll Index") + xlab("days after stress")
lgraph

This is great start, but lets isolate the measurement per tray ID - which is the third item in the File name (HDR_ExpID_TrayID_roundID.INF)

How do we get there?

strsplit(PS4$File[1], "_")[[1]][3]
## [1] "40352"

Now - lets isolate it for the entire data sheet:

for(i in 1:nrow(PS4)){
  PS4$tray.ID[i] <- strsplit(PS4$File[i], "_")[[1]][3]
}
length(unique(PS4$tray.ID))
## [1] 60
unique(PS4$Date)
## [1] 20250331 20250401 20250403 20250404 20250405 20250406 20250407 20250408
## [9] 20250409
## 22 Levels: 20250318 20250319 20250320 20250321 20250322 20250323 ... 20250409

Let’s transfer date and time into TOE.

for(i in 1:nrow(PS4)){
  PS4$month <- substr(PS4$Date, 5, 6)
  PS4$day <- substr(PS4$Date, 7, 8)
  PS4$hour <- substr(PS4$Time, 1, 2)
}
PS4

Trays were loaded on March 31st at around 11:00

PS4$TOE <- (as.numeric(as.character(PS4$month)) - 3)*24*31 + (as.numeric(as.character(PS4$day)) - 31)*24 + (as.numeric(as.character(PS4$hour)) - 11)
unique(PS4$TOE)
##  [1]  -4   0   5  24  75 100 120 139 152 164 176 191 200 212 224  25  76 122 102
## [20]  77 103   6 192   1  -3  78  79 123 140 165 213 225   7 153 177 201  96  34
## [39]  26   8 104 189 194 190  97  98  -2  22   2 214 166 195  23 141 154 202 226
## [58] 124  99 119 105  -1   3   4 215
PS4 <- subset(PS4, PS4$TOE > 0)
PS4

OK - then we have an issue with the FvFm being correct for one set of the data - and the other traits (FqFm and such) for other row. We need to correct it first:

# Get data containing right measurements into two separate datasets:
FvFm_data <- subset(PS4, PS4$Fv.Fm > 0)
notFvFm_data <- subset(PS4, PS4$Fv.Fm < 0)
# Get rid of collumns containing nonsense
FvFm_data <- FvFm_data[,c(1:5)]
notFvFm_data <- notFvFm_data[,c(1:4,6:23)]
FvFm_data
notFvFm_data

Now - let’s merge them together:

PS5 <- merge(FvFm_data, notFvFm_data, by =c("File", "Date", "Time", "Obj.Size"))
PS5

Before moving forward - let’s decode the data:

decode <- read.csv("20250330_SarahK_Batch3.2_coding.csv")
decode
decode <- decode[,c(2,7,3,6)]
colnames(decode)[1] <- "tray.ID"
decode

OK cool cool - now let’s fuse it with the PS2 data based on the tray.ID

unique(PS5$tray.ID)
##  [1] "40352" "40353" "40354" "40355" "40356" "40357" "40358" "40359" "40360"
## [10] "40361" "40362" "40363" "40364" "40365" "40366" "40367" "40368" "40369"
## [19] "40370" "40371" "40372" "40373" "40374" "40375" "40376" "40377" "40378"
## [28] "40379" "40380" "40381" "40382" "40383" "40384" "40385" "40386" "40387"
## [37] "40388" "40389" "40390" "40391" "40392" "40393" "40394" "40395" "40396"
## [46] "40397" "40398" "40399" "40400" "40401" "40402" "40403" "40404" "40405"
## [55] "40406" "40407" "40408" "40409" "40410" "40411"
PS6 <- merge(PS5, decode, by= "tray.ID", all=T)
PS6

Lets have a look at how the data looks like now:

lgraph <- ggplot(data=PS6, aes(x= TOE, y=Fv.Fm, group = tray.ID)) 
lgraph <- lgraph + geom_line(alpha = 0.7) 
lgraph <- lgraph + ylab("Maximum Quantum Yield (Fv/Fm)") + xlab("Hours of Imaging")
lgraph

lets add more info to the graph:

FvFm_graph <- ggplot(data=PS6, aes(x= TOE, y=Fv.Fm, group = tray.ID, color = TrayInfo)) 
FvFm_graph <- FvFm_graph + geom_line(alpha = 0.7) 
FvFm_graph <- FvFm_graph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= TrayInfo), alpha=0.3)
FvFm_graph <- FvFm_graph + stat_summary(fun=mean, aes(group= TrayInfo),  size=0.7, geom="line", linetype = "dashed")
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
FvFm_graph <- FvFm_graph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = TRUE)
FvFm_graph <- FvFm_graph + ylab("Fv/Fm (a.u.)") + xlab("Time of imaging (h)")
FvFm_graph
## Warning: Computation failed in `stat_compare_means()`.
## Caused by error in `mutate()`:
## ℹ In argument: `p = purrr::map(...)`.
## Caused by error in `purrr::map()`:
## ℹ In index: 49.
## ℹ With name: x.23.
## Caused by error in `t.test.default()`:
## ! not enough 'y' observations
## Warning: Removed 13 rows containing missing values or values outside the scale range
## (`geom_ribbon()`).

As you can see - there are some lines that are not exactly the same timepoints - so we will get in trouble when calculating averages. Therefore - we need to do splines!

unique(as.numeric(as.character(PS6$TOE)))
##  [1]   5  24  75 100 120 139 152 164 176 191 200 212 224  25  76 122 102  77 103
## [20]   6 192   1  78  79 123 140 165 213   7 153 177 201 225  96  34  26   8 104
## [39] 189 194 190  97  98  22   2 214 166 195  23 141 154 202 226 124  99 119 105
## [58]   3   4 215

Splines for ALL PS2 traits

So - let’s first isolate one plant to establish our spline calculations

max(PS6$TOE)
## [1] 226
hours <- seq(0, 226, by = 12)
hours
##  [1]   0  12  24  36  48  60  72  84  96 108 120 132 144 156 168 180 192 204 216
length(hours)
## [1] 19
temp <- subset(PS6, PS6$tray.ID == unique(PS6$tray.ID)[1])
temp$TOE <- as.numeric(as.character(temp$TOE))
temp <- temp[order(temp$TOE, decreasing = F),]
temp$TOE
##  [1]   5  24  75 100 120 139 152 164 176 191 200 212 224

Fv/Fm

plot.spl <- with(temp, smooth.spline(TOE, Fv.Fm, df = 13))
plot(Fv.Fm ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

Fq/Fm

plot.spl <- with(temp, smooth.spline(TOE, Fq..Fm., df = 13))
plot(Fq..Fm. ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

NPQ

plot.spl <- with(temp, smooth.spline(TOE, NPQ, df = 13))
plot(NPQ ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

qP

plot.spl <- with(temp, smooth.spline(TOE, qP, df = 13))
plot(qP ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

qN

plot.spl <- with(temp, smooth.spline(TOE, qN, df = 13))
plot(qN ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

qL

plot.spl <- with(temp, smooth.spline(TOE, qL, df = 13))
plot(qL ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

qE

plot.spl <- with(temp, smooth.spline(TOE, qE, df = 13))
plot(qE ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

qI

plot.spl <- with(temp, smooth.spline(TOE, qI, df = 13))
plot(qI ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

фno

temp
plot.spl <- with(temp, smooth.spline(TOE, X.Ñno, df = 13))
plot(X.Ñno ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

фnpq

plot.spl <- with(temp, smooth.spline(TOE, X.Ñnpq, df = 13))
plot(X.Ñnpq ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

npq(t)

plot.spl <- with(temp, smooth.spline(TOE, npq.t., df = 13))
plot(npq.t. ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

ChlIdx

plot.spl <- with(temp, smooth.spline(TOE, ChlIdx, df = 13))
plot(ChlIdx ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

AriIdx

plot.spl <- with(temp, smooth.spline(TOE, AriIdx, df = 13))
plot(AriIdx ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

NDVI

plot.spl <- with(temp, smooth.spline(TOE, NDVI, df = 13))
plot(NDVI ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")

Then - let’s save all of the information into one file

PS6
# CHANGE last thing into trait name
names <- c(text = "tray.ID", "TOE", "Fv.Fm", "Fq.Fm", "NPQ", "qP", "qN", "qL", "qE", "qI", "phiNO", "phiNPQ", "npq.t", "ChlIdx", "AriIdx", "NDVI")
spline_data <- data.frame()
for (k in names) {
  spline_data[[k]] <- as.character()}
pred_temp <- predict(plot.spl, hours)
length(pred_temp$x)
## [1] 19
spline_data[1:19,1] <- temp$tray.ID[1]
spline_data[1:19,2] <- pred_temp$x
plot.spl <- with(temp, smooth.spline(TOE, Fv.Fm, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,3] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, Fq..Fm., df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,4] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, NPQ, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,5] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qP, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,6] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qN, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,7] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qL, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,8] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qE, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,9] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qI, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,10] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, X.Ñno, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,11] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, X.Ñnpq, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,12] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, npq.t., df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,13] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, ChlIdx, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,14] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, AriIdx, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,15] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, NDVI, df = 13))
pred_temp <- predict(plot.spl, hours)
spline_data[1:19,16] <- pred_temp$y

final_spline <- spline_data
final_spline
all_plants <- unique(PS5$tray.ID)
all_plants
##  [1] "40352" "40353" "40354" "40355" "40356" "40357" "40358" "40359" "40360"
## [10] "40361" "40362" "40363" "40364" "40365" "40366" "40367" "40368" "40369"
## [19] "40370" "40371" "40372" "40373" "40374" "40375" "40376" "40377" "40378"
## [28] "40379" "40380" "40381" "40382" "40383" "40384" "40385" "40386" "40387"
## [37] "40388" "40389" "40390" "40391" "40392" "40393" "40394" "40395" "40396"
## [46] "40397" "40398" "40399" "40400" "40401" "40402" "40403" "40404" "40405"
## [55] "40406" "40407" "40408" "40409" "40410" "40411"
for(i in 2:60){
    temp <- subset(PS6, PS6$tray.ID == unique(PS6$tray.ID)[i])

   if (dim(temp)[1] > 3) {
        temp$TOE <- as.numeric(as.character(temp$TOE))
        temp <- temp[order(temp$TOE, decreasing = F),]
        spline_data[1:19,1] <- temp$tray.ID[1]
        spline_data[1:19,2] <- pred_temp$x
        plot.spl <- with(temp, smooth.spline(TOE, Fv.Fm, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,3] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, Fq..Fm., df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,4] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, NPQ, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,5] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, qP, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,6] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, qN, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,7] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, qL, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,8] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, qE, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,9] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, qI, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,10] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, X.Ñno, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,11] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, X.Ñnpq, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,12] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, npq.t., df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,13] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, ChlIdx, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,14] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, AriIdx, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,15] <- pred_temp$y
        plot.spl <- with(temp, smooth.spline(TOE, NDVI, df = 13))
        pred_temp <- predict(plot.spl, hours)
        spline_data[1:19,16] <- pred_temp$y
        final_spline <- rbind(final_spline, spline_data)
  } else {
        spline_data[1:19,1] <- temp$tray.ID[1]
        spline_data[1:19,2] <- hours
        spline_data[1:19,3] <- 0
        spline_data[1:19,4] <- 0
        spline_data[1:19,5] <- 0
        spline_data[1:19,6] <- 0
        spline_data[1:19,7] <- 0
        spline_data[1:19,8] <- 0
        spline_data[1:19,9] <- 0
        spline_data[1:19,10] <- 0
        spline_data[1:19,11] <- 0
        spline_data[1:19,12] <- 0
        spline_data[1:19,13] <- 0
        spline_data[1:19,14] <- 0
        spline_data[1:19,15] <- 0
        spline_data[1:19,16] <- 0
        final_spline <- rbind(final_spline, spline_data)
  }}
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 8
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 5
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 12
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 11
## Warning in smooth.spline(TOE, Fv.Fm, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, Fq..Fm., df = 13): not using invalid df; must
## have 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, NPQ, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, qP, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, qN, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, qL, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, qE, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, qI, df = 13): not using invalid df; must have 1 <
## df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, X.Ñno, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, X.Ñnpq, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, npq.t., df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, ChlIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, AriIdx, df = 13): not using invalid df; must have
## 1 < df <= n := #{unique x} = 7
## Warning in smooth.spline(TOE, NDVI, df = 13): not using invalid df; must have 1
## < df <= n := #{unique x} = 7
final_spline

Let’s change the collumns also to numeric - otherwise it will be tought to plot this:

final_spline2 <- final_spline
final_spline2[2:16] <- sapply(final_spline2[2:16],as.numeric)
final_spline2

Decode

Now - let’s decode all of the information into individual experiments and TrayInfos:

final_spline3 <- merge(final_spline2, decode, by = "tray.ID")
final_spline3
unique(final_spline3$TrayInfo)
## [1] "Control" "Drought"
unique(final_spline3$PlantID)
##  [1] "Tray01_Control_A1_Vietnam"   "Tray02_Control_A1_S.Africa" 
##  [3] "Tray03_Control_A1_Australia" "Tray04_Control_A1_Pakistan" 
##  [5] "Tray05_Control_A1_Texas"     "Tray06_Control_A1_Mexico"   
##  [7] "Tray07_Drought_A1_Australia" "Tray08_Drought_A1_Texas"    
##  [9] "Tray09_Control_A1_Mexico"    "Tray10_Control_A1_Pakistan" 
## [11] "Tray11_Drought_A1_Vietnam"   "Tray12_Control_A1_Texas"    
## [13] "Tray13_Drought_A1_Mexico"    "Tray14_Control_A1_Vietnam"  
## [15] "Tray15_Drought_A1_Australia" "Tray16_Control_A1_S.Africa" 
## [17] "Tray17_Drought_A1_Texas"     "Tray18_Drought_A1_S.Africa" 
## [19] "Tray19_Drought_A1_Pakistan"  "Tray20_Drought_A1_Pakistan" 
## [21] "Tray21_Drought_A1_S.Africa"  "Tray22_Control_A1_Texas"    
## [23] "Tray23_Control_A1_S.Africa"  "Tray24_Drought_A1_Vietnam"  
## [25] "Tray25_Control_A1_Australia" "Tray26_Control_A1_Pakistan" 
## [27] "Tray27_Drought_A1_Australia" "Tray28_Drought_A1_Mexico"   
## [29] "Tray29_Drought_A1_Pakistan"  "Tray30_Drought_A1_Australia"
## [31] "Tray31_Control_A1_Vietnam"   "Tray32_Drought_A1_Texas"    
## [33] "Tray33_Drought_A1_S.Africa"  "Tray34_Drought_A1_Vietnam"  
## [35] "Tray35_Control_A1_Texas"     "Tray36_Control_A1_Mexico"   
## [37] "Tray37_Control_A1_Australia" "Tray38_Drought_A1_Pakistan" 
## [39] "Tray39_Drought_A1_Mexico"    "Tray40_Drought_A1_Vietnam"  
## [41] "Tray41_Control_A1_Vietnam"   "Tray42_Drought_A1_Texas"    
## [43] "Tray43_Drought_A1_S.Africa"  "Tray44_Control_A1_Australia"
## [45] "Tray45_Drought_A1_Pakistan"  "Tray46_Drought_A1_Mexico"   
## [47] "Tray47_Drought_A1_S.Africa"  "Tray48_Drought_A1_Mexico"   
## [49] "Tray49_Control_A1_Texas"     "Tray50_Control_A1_Australia"
## [51] "Tray51_Control_A1_Pakistan"  "Tray52_Control_A1_Mexico"   
## [53] "Tray53_Drought_A1_Texas"     "Tray54_Control_A1_S.Africa" 
## [55] "Tray55_Control_A1_S.Africa"  "Tray56_Drought_A1_Australia"
## [57] "Tray57_Control_A1_Vietnam"   "Tray58_Control_A1_Mexico"   
## [59] "Tray59_Control_A1_Pakistan"  "Tray60_Drought_A1_Vietnam"

Plotting PS2 data

Fv/Fm

library(ggsci)

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = Fv.Fm, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "Fv/Fm (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Maximum Quantum Yield of Photosystem II")
C1_lgraph
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

library("dplyr")
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(cowplot)
## 
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggpubr':
## 
##     get_legend
get_p_value <- function(final_spline3) {
  t.test(Fv.Fm ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## Warning: There was 1 warning in `summarise()`.
## ℹ In argument: `p_value = get_p_value(cur_data())`.
## ℹ In group 1: `TOE = 0` `PlantName = "Australia"`.
## Caused by warning:
## ! `cur_data()` was deprecated in dplyr 1.1.0.
## ℹ Please use `pick()` instead.
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_FvFm.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
dev.off()
## quartz_off_screen 
##                 2

Fq/Fm

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = Fq.Fm, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "Fq'/Fm'") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Quantum Yield of Photosystem II in light adapted state")
get_p_value <- function(final_spline3) {
  t.test(Fq.Fm ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_FqFm.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
dev.off()
## quartz_off_screen 
##                 2

NPQ

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = NPQ, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "NPQ (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Non-photochemical Quenching [(Fm-Fm’)/Fm’]")
get_p_value <- function(final_spline3) {
    t.test(NPQ ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_NPQ.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Non-photochemical Quenching [(Fm-Fm’)/Fm’]' in 'mbcsToSbcs': ' substituted
## for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Non-photochemical Quenching [(Fm-Fm’)/Fm’]' in 'mbcsToSbcs': ' substituted
## for ’ (U+2019)
dev.off()
## quartz_off_screen 
##                 2

qP

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = qP, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "qP (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Fraction of Open Reaction Centers (puddle mode) / photochemical quenching [(Fm’ – Fs’)/(Fm’ – F0’)]")
get_p_value <- function(final_spline3) {
    t.test(qP ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_qP.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (puddle mode) / photochemical quenching
## [(Fm’ – Fs’)/(Fm’ – F0’)]' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (puddle mode) / photochemical quenching
## [(Fm’ – Fs’)/(Fm’ – F0’)]' in 'mbcsToSbcs': - substituted for – (U+2013)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (puddle mode) / photochemical quenching
## [(Fm’ – Fs’)/(Fm’ – F0’)]' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (puddle mode) / photochemical quenching
## [(Fm’ – Fs’)/(Fm’ – F0’)]' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (puddle mode) / photochemical quenching
## [(Fm’ – Fs’)/(Fm’ – F0’)]' in 'mbcsToSbcs': - substituted for – (U+2013)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (puddle mode) / photochemical quenching
## [(Fm’ – Fs’)/(Fm’ – F0’)]' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
dev.off()
## quartz_off_screen 
##                 2

qN

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = qN, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "qN (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Non-photochemical Quenching [1 – (Fm’ – F0’)/(Fm-F0)]")
get_p_value <- function(final_spline3) {
    t.test(qN ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_qN.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Non-photochemical Quenching [1 – (Fm’ – F0’)/(Fm-F0)]' in 'mbcsToSbcs': -
## substituted for – (U+2013)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Non-photochemical Quenching [1 – (Fm’ – F0’)/(Fm-F0)]' in 'mbcsToSbcs': '
## substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Non-photochemical Quenching [1 – (Fm’ – F0’)/(Fm-F0)]' in 'mbcsToSbcs': -
## substituted for – (U+2013)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Non-photochemical Quenching [1 – (Fm’ – F0’)/(Fm-F0)]' in 'mbcsToSbcs': '
## substituted for ’ (U+2019)
dev.off()
## quartz_off_screen 
##                 2

qL

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = qL, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "qL (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Fraction of Open Reaction Centers (lake mode) / photochemical quenching (qP*F0’/Fs’)")
get_p_value <- function(final_spline3) {
    t.test(qL ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_qL.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (lake mode) / photochemical quenching
## (qP*F0’/Fs’)' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fraction of Open Reaction Centers (lake mode) / photochemical quenching
## (qP*F0’/Fs’)' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
dev.off()
## quartz_off_screen 
##                 2

qE

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = qE, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "qE (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("fast relaxing component of NPQ (Fm*(Fm''-Fm’)/(Fm''*Fm’)")
get_p_value <- function(final_spline3) {
    t.test(qE ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Removed 114 rows containing missing values or values outside the scale range
## (`geom_line()`).

pdf("Batch03.2_PS2_qE.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Removed 114 rows containing missing values or values outside the scale range
## (`geom_line()`).
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'fast relaxing component of NPQ (Fm*(Fm''-Fm’)/(Fm''*Fm’)' in 'mbcsToSbcs':
## ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'fast relaxing component of NPQ (Fm*(Fm''-Fm’)/(Fm''*Fm’)' in 'mbcsToSbcs':
## ' substituted for ’ (U+2019)
dev.off()
## quartz_off_screen 
##                 2

qI

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = qI, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "qI (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Slow relaxing component of NPQ [(Fm-Fm'')/Fm'']")
get_p_value <- function(final_spline3) {
    t.test(qI ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_qI.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
dev.off()
## quartz_off_screen 
##                 2

PhiNO

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = phiNO, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "ɸNO (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Quantum Yield of non-regulated energy dissipation [1/(NPQ+1+qI*Fm/F0)]")
get_p_value <- function(final_spline3) {
    t.test(phiNO ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_phiNO.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': for ɸ (U+0278)
dev.off()
## quartz_off_screen 
##                 2

PhiNPQ

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = phiNPQ, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "ɸNPQ (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Quantum Yield of NPQ (regulated energy dissipation) (1-Fq’/Fm’- ɸNO)")
get_p_value <- function(final_spline3) {
    t.test(phiNPQ ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_phiNPQ.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': for ɸ (U+0278)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Quantum Yield of NPQ (regulated energy dissipation) (1-Fq’/Fm’- ɸNO)' in
## 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Quantum Yield of NPQ (regulated energy dissipation) (1-Fq’/Fm’- ɸNO)' in
## 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Quantum Yield of NPQ (regulated energy dissipation)
## (1-Fq’/Fm’- ɸNO)' in 'mbcsToSbcs': for ɸ (U+0278)
dev.off()
## quartz_off_screen 
##                 2

NPQ(t)

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = npq.t, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "NPQ(t) (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Fast NPQ  4.88/(Fm’/F0’-1)-1")
get_p_value <- function(final_spline3) {
# CHANGE
    t.test(npq.t ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_NPQ(t).pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fast NPQ 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## for 'Fast NPQ 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs': ' substituted for ’ (U+2019)
dev.off()
## quartz_off_screen 
##                 2

ChlIdx

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = ChlIdx, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "ChlIdx (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Chlorophyll Index")
get_p_value <- function(final_spline3) {
    t.test(ChlIdx ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_ChlIdx.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
dev.off()
## quartz_off_screen 
##                 2

AriIdx

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = AriIdx, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "AriIdx (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Anthocyanin Reflectance Index")
get_p_value <- function(final_spline3) {
    t.test(AriIdx ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

# CHANGE
pdf("Batch03.2_PS2_AriIdx.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
dev.off()
## quartz_off_screen 
##                 2

NDVI

C1_lgraph <- ggplot(data = final_spline3, aes(x = TOE, y = NDVI, group = tray.ID, color = TrayInfo)) 
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ PlantName, ncol = 6)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = TrayInfo), alpha = 0.3) 
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = TrayInfo), size = 0.7, geom = "line", linetype = "dashed") 
C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = TrayInfo), label = "p.signif", method = "t.test", hide.ns = F) 
C1_lgraph <- C1_lgraph + labs(x = "", y = "NDVI (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Normalized Difference Vegetation Index")
get_p_value <- function(final_spline3) {
    t.test(NDVI ~ TrayInfo, data = final_spline3)$p.value
}
p_values <- final_spline3 %>%
  group_by(TOE, PlantName) %>%
  summarise(p_value = get_p_value(cur_data())) %>%
  ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)

C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD)) 
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ PlantName, ncol = 6)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)") 
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank()) 

plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle

pdf("Batch03.2_PS2_NDVI.pdf", height = 5, width = 20)
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning: Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Computation failed in `stat_compare_means()`.
## Caused by error in `purrr::map()`:
## ℹ In index: 1.
## Caused by error in `.check_npc_coord()`:
## ! '*.npc coord for x axis should be either a numeric value in [0-1] or a character strings including one of right, left, center, centre, middle
dev.off()
## quartz_off_screen 
##                 2

OK - that’s all - but just before we finish this - let’s save all of the data:

write.csv(final_spline3, "Final_Batch.03.2.PS2.csv", row.names = F)