A pipeline for evaluating the RGB and PS2 data

Load the RGB data

list.files()
## [1] "20240813_CarmenStarch.Rmd"            
## [2] "Carmen_Decode.csv"                    
## [3] "consolidated_data (1).csv"            
## [4] "Exp10102_Carmen.TXT"                  
## [5] "Initial figures for Carmen_MMJ.pdf"   
## [6] "Initial figures for Carmen.pdf"       
## [7] "MMJ_Carmen_StarchMutants_20240621.csv"
RGB <- read.csv("consolidated_data (1).csv")
RGB$measurement_value <- as.numeric(as.character(RGB$measurement_value))
RGB

Let’s separate the file_name into individual sections - including timestamp, trayID and so on.

strsplit(RGB$file_name[1], "_")
## [[1]]
## [1] "20240608-174413" "35738603225088"  "00034872"        "010102"         
## [5] "039586"          "Side01.xml"

1st element is timestamp (YYYMMDD-HHMMSS), then some unknown ID, then tray ID, experiment ID, some other unknown ID and side.xml file

We will need timestamp and trayID for this experiment:

timestamp <- strsplit(RGB$file_name[1], "_")[[1]][1]
tray.ID <- strsplit(RGB$file_name[1], "_")[[1]][3]

Now let’s loop it into all of the rows of our dataset:

for(i in 1:nrow(RGB)){
  RGB$timestamp[i]  <- strsplit(RGB$file_name[i], "_")[[1]][1]
  RGB$tray.ID[i] <- strsplit(RGB$file_name[i], "_")[[1]][3]
}
RGB$tray.ID <- as.numeric(as.character(RGB$tray.ID))
unique(RGB$tray.ID)
##  [1] 34872 34873 34874 34875 34876 34853 34854 34856 34857 34859 34862 34863
## [13] 34867 34868 34869 34870 34871
unique(RGB$timestamp)
##  [1] "20240608-174413" "20240608-174545" "20240608-174717" "20240608-174849"
##  [5] "20240608-175022" "20240608-184452" "20240608-185031" "20240608-190149"
##  [9] "20240608-190729" "20240608-191846" "20240608-193544" "20240608-194123"
## [13] "20240608-200359" "20240608-200938" "20240608-201517" "20240608-202057"
## [17] "20240608-202637" "20240608-203216" "20240608-203755" "20240608-204335"
## [21] "20240608-204915" "20240608-205454" "20240609-031226" "20240609-031806"
## [25] "20240609-032926" "20240609-033506" "20240609-040905" "20240609-043145"
## [29] "20240609-043725" "20240609-044307" "20240609-044847" "20240609-045427"
## [33] "20240609-050009" "20240609-050550" "20240609-051132" "20240609-051712"
## [37] "20240609-052252" "20240610-093637" "20240610-094218" "20240610-095340"
## [41] "20240610-095922" "20240610-101046" "20240610-102749" "20240610-103330"
## [45] "20240610-105617" "20240610-110159" "20240610-110741" "20240610-111322"
## [49] "20240610-111903" "20240610-112442" "20240610-113022" "20240610-113603"
## [53] "20240610-114143" "20240610-114725"

Let’s keep only the trays that we know we have:

decode <- read.csv("Carmen_Decode.csv")
colnames(decode)[1] <- "tray.ID"
decode
unique(RGB$tray_id)
## NULL
RGB2 <- merge(RGB, decode, by= "tray.ID", all=T)
RGB2
unique(RGB2$measurement_name)
##   [1] "Side01_00_area"                  "Side01_00_height"               
##   [3] "Side01_00_compactness"           "Side01_00_contlength"           
##   [5] "Side01_00_width"                 "Side01_00_inner_radius"         
##   [7] "Side01_00_dist_mean"             "Side01_00_dist_deviation"       
##   [9] "Side01_00_holes_num"             "Side01_00_areaInMm2"            
##  [11] "Side01_00_heightInMm"            "Side01_00_roundness"            
##  [13] "Side01_00_rectangularity"        "Side01_00_anisometry"           
##  [15] "Side01_00_bulkiness"             "Side01_00_convexity"            
##  [17] "Side01_00_outer_radius"          "Side01_00_CenterOfMassY"        
##  [19] "Side01_00_CenterOfMassDistance"  "Side01_00_H_Mean"               
##  [21] "Side01_00_H_Median"              "Side01_00_H_StDev"              
##  [23] "Side01_00_H_Q1"                  "Side01_00_H_Q3"                 
##  [25] "Side01_00_widthInMm"             "Side01_00_Convex_Hull_Area"     
##  [27] "Side01_00_AverageColor_H"        "Side01_00_AverageColor_S"       
##  [29] "Side01_00_struct_factor"         "Side01_00_CenterOfMassX"        
##  [31] "Rfid"                            "Side01_00_row1"                 
##  [33] "Side01_00_HistoH_0_5"            "Side01_00_HistoH_5_10"          
##  [35] "Side01_00_HistoH_10_15"          "Side01_00_circularity"          
##  [37] "Side01_00_HistoH_20_25"          "Side01_00_HistoH_25_30"         
##  [39] "Side01_00_HistoH_30_35"          "Side01_00_HistoH_35_40"         
##  [41] "Side01_00_HistoH_40_45"          "Side01_00_AverageColor_V"       
##  [43] "Side01_00_HistoH_50_55"          "Side01_00_HistoH_55_60"         
##  [45] "Side01_00_HistoH_60_65"          "Side01_00_HistoH_65_70"         
##  [47] "Side01_00_HistoH_70_75"          "Side01_00_HistoH_75_80"         
##  [49] "Side01_00_HistoH_80_85"          "Side01_00_HistoH_85_90"         
##  [51] "Side01_00_HistoH_90_95"          "Side01_00_HistoH_95_100"        
##  [53] "Side01_00_HistoH_100_105"        "Side01_00_HistoH_105_110"       
##  [55] "Side01_00_HistoH_45_50"          "Side01_00_HistoH_115_120"       
##  [57] "Side01_00_HistoH_120_125"        "Side01_00_HistoH_125_130"       
##  [59] "Side01_00_HistoH_130_135"        "Side01_00_HistoH_135_140"       
##  [61] "Side01_00_HistoH_140_145"        "Side01_00_HistoH_145_150"       
##  [63] "Side01_00_HistoH_150_155"        "Side01_00_HistoH_155_160"       
##  [65] "Side01_00_HistoH_160_165"        "Side01_00_HistoH_165_170"       
##  [67] "Side01_00_HistoH_170_175"        "Side01_00_HistoH_110_115"       
##  [69] "Side01_00_green(H_58_99)"        "Side01_00_green-cyan(H_100_120)"
##  [71] "Side01_00_cyan-blue(H_121_142)"  "Side01_00_blue(H_143_156)"      
##  [73] "Side01_03_H_Q3"                  "Side01_03_brown(H_14_27)"       
##  [75] "Side01_03_brown-yellow(H_28_35)" "Side01_03_yellow(H_36_43)"      
##  [77] "Side01_03_yellow-green(H_44_57)" "Side01_03_green(H_58_99)"       
##  [79] "Side01_03_green-cyan(H_100_120)" "Side01_03_cyan-blue(H_121_142)" 
##  [81] "Side01_03_blue(H_143_156)"       "Side01_03_HistoH_0_5"           
##  [83] "Side01_03_HistoH_5_10"           "Side01_03_HistoH_10_15"         
##  [85] "Side01_03_HistoH_15_20"          "Side01_03_HistoH_20_25"         
##  [87] "Side01_03_HistoH_25_30"          "Side01_03_HistoH_30_35"         
##  [89] "Side01_03_HistoH_35_40"          "Side01_03_HistoH_40_45"         
##  [91] "Side01_03_HistoH_45_50"          "Side01_03_HistoH_50_55"         
##  [93] "Side01_03_HistoH_55_60"          "Side01_03_HistoH_60_65"         
##  [95] "Side01_03_HistoH_65_70"          "Side01_03_HistoH_70_75"         
##  [97] "Side01_03_HistoH_75_80"          "Side01_03_HistoH_80_85"         
##  [99] "Side01_03_HistoH_85_90"          "Side01_03_HistoH_90_95"         
## [101] "Side01_03_HistoH_95_100"         "Side01_03_HistoH_100_105"       
## [103] "Side01_03_HistoH_105_110"        "Side01_03_HistoH_110_115"       
## [105] "Side01_03_HistoH_115_120"        "Side01_03_HistoH_120_125"       
## [107] "Side01_03_HistoH_125_130"        "Side01_03_HistoH_130_135"       
## [109] "Side01_03_HistoH_135_140"        "Side01_03_HistoH_140_145"       
## [111] "Side01_03_HistoH_145_150"        "Side01_03_HistoH_150_155"       
## [113] "Side01_03_HistoH_155_160"        "Side01_03_HistoH_160_165"       
## [115] "Side01_03_HistoH_165_170"        "Side01_03_HistoH_170_175"       
## [117] "Side01_03_HistoH_175_180"        "Side01_03_HistoH_180_185"       
## [119] "Side01_03_HistoH_185_190"        "Side01_03_HistoH_190_195"       
## [121] "Side01_03_HistoH_195_200"        "Side01_03_HistoH_200_205"       
## [123] "Side01_03_HistoH_205_210"        "Side01_03_HistoH_210_215"       
## [125] "Side01_03_HistoH_215_220"        "Side01_03_HistoH_220_225"       
## [127] "Side01_03_HistoH_225_230"        "Side01_03_HistoH_230_235"       
## [129] "Side01_03_HistoH_235_240"        "Side01_03_HistoH_240_245"       
## [131] "Side01_03_HistoH_245_250"        "Side01_03_HistoH_250_255"       
## [133] "Side01_03_Greennes_Mean"         "Side01_03_Greennes_Deviation"   
## [135] "Side01_03_BarcodeEnabled"        "Side01_03_BarcodeFound"         
## [137] "BarcodeResult"                   "Side01_04_row1"                 
## [139] "Side01_04_area"                  "Side01_04_height"               
## [141] "Side01_04_width"                 "Side01_04_circularity"          
## [143] "Side01_04_compactness"           "Side01_04_contlength"           
## [145] "Side01_04_convexity"             "Side01_00_brown(H_14_27)"       
## [147] "Side01_00_brown-yellow(H_28_35)" "Side01_00_yellow(H_36_43)"      
## [149] "Side01_00_yellow-green(H_44_57)" "Side01_04_outer_radius"         
## [151] "Side01_04_inner_radius"          "Side01_04_dist_mean"            
## [153] "Side01_04_dist_deviation"        "Side01_04_roundness"            
## [155] "Side01_04_holes_num"             "Side01_04_areaInMm2"            
## [157] "Side01_00_HistoH_15_20"          "Side01_02_Greennes_Deviation"   
## [159] "Side01_02_BarcodeEnabled"        "Side01_02_BarcodeFound"         
## [161] "Side01_03_row1"                  "Side01_03_area"                 
## [163] "Side01_03_height"                "Side01_03_width"                
## [165] "Side01_03_circularity"           "Side01_03_compactness"          
## [167] "Side01_03_contlength"            "Side01_03_convexity"            
## [169] "Side01_03_rectangularity"        "Side01_03_anisometry"           
## [171] "Side01_03_bulkiness"             "Side01_03_struct_factor"        
## [173] "Side01_03_outer_radius"          "Side01_03_inner_radius"         
## [175] "Side01_03_dist_mean"             "Side01_03_dist_deviation"       
## [177] "Side01_03_roundness"             "Side01_03_holes_num"            
## [179] "Side01_03_areaInMm2"             "Side01_03_heightInMm"           
## [181] "Side01_03_widthInMm"             "Side01_03_Convex_Hull_Area"     
## [183] "Side01_03_AverageColor_H"        "Side01_03_AverageColor_S"       
## [185] "Side01_03_AverageColor_V"        "Side01_03_CenterOfMassX"        
## [187] "Side01_03_CenterOfMassY"         "Side01_03_CenterOfMassDistance" 
## [189] "Side01_03_H_Mean"                "Side01_03_H_Median"             
## [191] "Side01_03_H_StDev"               "Side01_03_H_Q1"                 
## [193] "Side01_00_HistoH_195_200"        "Side01_00_HistoH_200_205"       
## [195] "Side01_00_HistoH_205_210"        "Side01_00_HistoH_210_215"       
## [197] "Side01_00_HistoH_215_220"        "Side01_00_HistoH_220_225"       
## [199] "Side01_00_HistoH_225_230"        "Side01_00_HistoH_230_235"       
## [201] "Side01_00_HistoH_235_240"        "Side01_00_HistoH_240_245"       
## [203] "Side01_00_HistoH_245_250"        "Side01_00_HistoH_250_255"       
## [205] "Side01_00_Greennes_Mean"         "Side01_00_Greennes_Deviation"   
## [207] "Side01_00_BarcodeEnabled"        "Side01_00_BarcodeFound"         
## [209] "Side01_01_row1"                  "Side01_01_area"                 
## [211] "Side01_01_height"                "Side01_01_width"                
## [213] "Side01_01_circularity"           "Side01_01_compactness"          
## [215] "Side01_01_contlength"            "Side01_01_convexity"            
## [217] "Side01_01_rectangularity"        "Side01_01_anisometry"           
## [219] "Side01_01_bulkiness"             "Side01_01_struct_factor"        
## [221] "Side01_01_outer_radius"          "Side01_01_inner_radius"         
## [223] "Side01_01_dist_mean"             "Side01_01_dist_deviation"       
## [225] "Side01_01_roundness"             "Side01_01_holes_num"            
## [227] "Side01_01_areaInMm2"             "Side01_01_heightInMm"           
## [229] "Side01_01_widthInMm"             "Side01_01_Convex_Hull_Area"     
## [231] "Side01_01_AverageColor_H"        "Side01_01_AverageColor_S"       
## [233] "Side01_01_AverageColor_V"        "Side01_01_CenterOfMassX"        
## [235] "Side01_01_CenterOfMassY"         "Side01_01_CenterOfMassDistance" 
## [237] "Side01_01_H_Mean"                "Side01_01_H_Median"             
## [239] "Side01_01_H_StDev"               "Side01_01_H_Q1"                 
## [241] "Side01_01_H_Q3"                  "Side01_01_brown(H_14_27)"       
## [243] "Side01_01_brown-yellow(H_28_35)" "Side01_01_yellow(H_36_43)"      
## [245] "Side01_01_yellow-green(H_44_57)" "Side01_01_green(H_58_99)"       
## [247] "Side01_01_green-cyan(H_100_120)" "Side01_01_cyan-blue(H_121_142)" 
## [249] "Side01_01_blue(H_143_156)"       "Side01_01_HistoH_0_5"           
## [251] "Side01_01_HistoH_5_10"           "Side01_01_HistoH_10_15"         
## [253] "Side01_01_HistoH_15_20"          "Side01_01_HistoH_20_25"         
## [255] "Side01_01_HistoH_25_30"          "Side01_01_HistoH_30_35"         
## [257] "Side01_01_HistoH_35_40"          "Side01_01_HistoH_40_45"         
## [259] "Side01_01_HistoH_45_50"          "Side01_01_HistoH_50_55"         
## [261] "Side01_01_HistoH_55_60"          "Side01_01_HistoH_60_65"         
## [263] "Side01_01_HistoH_65_70"          "Side01_01_HistoH_70_75"         
## [265] "Side01_04_rectangularity"        "Side01_04_anisometry"           
## [267] "Side01_04_bulkiness"             "Side01_04_struct_factor"        
## [269] "Side01_02_HistoH_215_220"        "Side01_02_HistoH_220_225"       
## [271] "Side01_02_HistoH_225_230"        "Side01_02_HistoH_230_235"       
## [273] "Side01_02_HistoH_235_240"        "Side01_02_HistoH_240_245"       
## [275] "Side01_02_HistoH_245_250"        "Side01_04_heightInMm"           
## [277] "Side01_04_widthInMm"             "Side01_04_Convex_Hull_Area"     
## [279] "Side01_04_AverageColor_H"        "Side01_04_AverageColor_S"       
## [281] "Side01_04_AverageColor_V"        "Side01_04_CenterOfMassX"        
## [283] "Side01_04_CenterOfMassY"         "Side01_04_CenterOfMassDistance" 
## [285] "Side01_04_H_Mean"                "Side01_04_H_Median"             
## [287] "Side01_04_H_StDev"               "Side01_04_H_Q1"                 
## [289] "Side01_04_H_Q3"                  "Side01_04_brown(H_14_27)"       
## [291] "Side01_04_brown-yellow(H_28_35)" "Side01_04_yellow(H_36_43)"      
## [293] "Side01_04_yellow-green(H_44_57)" "Side01_04_green(H_58_99)"       
## [295] "Side01_04_green-cyan(H_100_120)" "Side01_04_cyan-blue(H_121_142)" 
## [297] "Side01_04_blue(H_143_156)"       "Side01_04_HistoH_0_5"           
## [299] "Side01_04_HistoH_5_10"           "Side01_04_HistoH_10_15"         
## [301] "Side01_04_HistoH_15_20"          "Side01_04_HistoH_20_25"         
## [303] "Side01_04_HistoH_25_30"          "Side01_04_HistoH_30_35"         
## [305] "Side01_04_HistoH_35_40"          "Side01_04_HistoH_40_45"         
## [307] "Side01_04_HistoH_45_50"          "Side01_04_HistoH_50_55"         
## [309] "Side01_00_HistoH_175_180"        "Side01_00_HistoH_180_185"       
## [311] "Side01_00_HistoH_185_190"        "Side01_00_HistoH_190_195"       
## [313] "Side01_02_HistoH_250_255"        "Side01_02_Greennes_Mean"        
## [315] "HistoH_130_135"                  "HistoH_135_140"                 
## [317] "HistoH_140_145"                  "HistoH_145_150"                 
## [319] "HistoH_150_155"                  "HistoH_155_160"                 
## [321] "HistoH_160_165"                  "HistoH_165_170"                 
## [323] "HistoH_170_175"                  "HistoH_175_180"                 
## [325] "HistoH_180_185"                  "HistoH_185_190"                 
## [327] "HistoH_190_195"                  "HistoH_195_200"                 
## [329] "HistoH_200_205"                  "HistoH_205_210"                 
## [331] "HistoH_210_215"                  "HistoH_215_220"                 
## [333] "HistoH_220_225"                  "HistoH_225_230"                 
## [335] "HistoH_230_235"                  "HistoH_235_240"                 
## [337] "HistoH_240_245"                  "HistoH_245_250"                 
## [339] "HistoH_250_255"                  "Greennes_Mean"                  
## [341] "Greennes_Deviation"              "BarcodeEnabled"                 
## [343] "BarcodeFound"                    "Side01_01_HistoH_130_135"       
## [345] "Side01_01_HistoH_135_140"        "Side01_01_HistoH_140_145"       
## [347] "Side01_01_HistoH_145_150"        "Side01_01_HistoH_150_155"       
## [349] "Side01_01_HistoH_155_160"        "Side01_01_HistoH_160_165"       
## [351] "Side01_01_HistoH_165_170"        "Side01_01_HistoH_170_175"       
## [353] "Side01_01_HistoH_175_180"        "Side01_01_HistoH_180_185"       
## [355] "Side01_01_HistoH_185_190"        "Side01_01_HistoH_190_195"       
## [357] "Side01_01_HistoH_195_200"        "Side01_01_HistoH_200_205"       
## [359] "Side01_01_HistoH_205_210"        "Side01_01_HistoH_210_215"       
## [361] "Side01_01_HistoH_215_220"        "Side01_01_HistoH_220_225"       
## [363] "Side01_01_HistoH_225_230"        "Side01_01_HistoH_230_235"       
## [365] "Side01_01_HistoH_235_240"        "Side01_01_HistoH_240_245"       
## [367] "Side01_01_HistoH_245_250"        "Side01_01_HistoH_250_255"       
## [369] "Side01_01_Greennes_Mean"         "Side01_01_Greennes_Deviation"   
## [371] "Side01_01_BarcodeEnabled"        "Side01_01_BarcodeFound"         
## [373] "Side01_02_row1"                  "Side01_02_area"                 
## [375] "Side01_02_height"                "Side01_02_width"                
## [377] "Side01_02_circularity"           "Side01_02_compactness"          
## [379] "Side01_02_contlength"            "Side01_02_convexity"            
## [381] "Side01_02_rectangularity"        "Side01_02_anisometry"           
## [383] "Side01_02_bulkiness"             "Side01_02_struct_factor"        
## [385] "Side01_02_outer_radius"          "Side01_02_inner_radius"         
## [387] "Side01_02_dist_mean"             "Side01_02_dist_deviation"       
## [389] "Side01_02_roundness"             "Side01_02_holes_num"            
## [391] "Side01_02_areaInMm2"             "Side01_02_heightInMm"           
## [393] "Side01_02_widthInMm"             "Side01_02_Convex_Hull_Area"     
## [395] "Side01_02_AverageColor_H"        "Side01_02_AverageColor_S"       
## [397] "Side01_02_AverageColor_V"        "Side01_02_CenterOfMassX"        
## [399] "Side01_02_CenterOfMassY"         "Side01_02_CenterOfMassDistance" 
## [401] "Side01_02_H_Mean"                "Side01_02_H_Median"             
## [403] "Side01_02_H_StDev"               "Side01_02_H_Q1"                 
## [405] "Side01_02_H_Q3"                  "Side01_02_brown(H_14_27)"       
## [407] "Side01_02_brown-yellow(H_28_35)" "Side01_02_yellow(H_36_43)"      
## [409] "Side01_02_yellow-green(H_44_57)" "Side01_02_green(H_58_99)"       
## [411] "Side01_02_green-cyan(H_100_120)" "Side01_02_cyan-blue(H_121_142)" 
## [413] "Side01_02_blue(H_143_156)"       "Side01_02_HistoH_0_5"           
## [415] "Side01_02_HistoH_5_10"           "Side01_02_HistoH_10_15"         
## [417] "Side01_01_HistoH_75_80"          "Side01_01_HistoH_80_85"         
## [419] "Side01_01_HistoH_85_90"          "Side01_01_HistoH_90_95"         
## [421] "Side01_01_HistoH_95_100"         "Side01_01_HistoH_100_105"       
## [423] "Side01_01_HistoH_105_110"        "Side01_01_HistoH_110_115"       
## [425] "Side01_01_HistoH_115_120"        "Side01_01_HistoH_120_125"       
## [427] "Side01_01_HistoH_125_130"        "Side01_02_HistoH_15_20"         
## [429] "Side01_02_HistoH_20_25"          "Side01_02_HistoH_25_30"         
## [431] "Side01_02_HistoH_30_35"          "Side01_02_HistoH_35_40"         
## [433] "Side01_02_HistoH_40_45"          "Side01_02_HistoH_45_50"         
## [435] "Side01_02_HistoH_50_55"          "Side01_02_HistoH_55_60"         
## [437] "Side01_02_HistoH_60_65"          "Side01_02_HistoH_65_70"         
## [439] "Side01_02_HistoH_70_75"          "Side01_02_HistoH_75_80"         
## [441] "Side01_02_HistoH_80_85"          "Side01_02_HistoH_85_90"         
## [443] "Side01_02_HistoH_90_95"          "Side01_02_HistoH_95_100"        
## [445] "Side01_02_HistoH_100_105"        "Side01_02_HistoH_105_110"       
## [447] "Side01_02_HistoH_110_115"        "Side01_02_HistoH_115_120"       
## [449] "Side01_02_HistoH_120_125"        "Side01_02_HistoH_125_130"       
## [451] "Side01_02_HistoH_130_135"        "Side01_02_HistoH_135_140"       
## [453] "Side01_02_HistoH_140_145"        "Side01_02_HistoH_145_150"       
## [455] "Side01_02_HistoH_150_155"        "Side01_02_HistoH_155_160"       
## [457] "Side01_02_HistoH_160_165"        "Side01_02_HistoH_165_170"       
## [459] "Side01_02_HistoH_170_175"        "Side01_02_HistoH_175_180"       
## [461] "Side01_02_HistoH_180_185"        "Side01_02_HistoH_185_190"       
## [463] "Side01_02_HistoH_190_195"        "Side01_02_HistoH_195_200"       
## [465] "Side01_02_HistoH_200_205"        "Side01_02_HistoH_205_210"       
## [467] "Side01_02_HistoH_210_215"        "HistoH_85_90"                   
## [469] "HistoH_90_95"                    "HistoH_95_100"                  
## [471] "HistoH_100_105"                  "HistoH_105_110"                 
## [473] "HistoH_110_115"                  "HistoH_115_120"                 
## [475] "HistoH_120_125"                  "HistoH_125_130"                 
## [477] "Side01_04_HistoH_55_60"          "Side01_04_HistoH_60_65"         
## [479] "Side01_04_HistoH_65_70"          "Side01_04_HistoH_70_75"         
## [481] "Side01_04_HistoH_75_80"          "Side01_04_HistoH_80_85"         
## [483] "Side01_04_HistoH_85_90"          "Side01_04_HistoH_90_95"         
## [485] "Side01_04_HistoH_95_100"         "Side01_04_HistoH_100_105"       
## [487] "Side01_04_HistoH_105_110"        "Side01_04_HistoH_110_115"       
## [489] "Side01_04_HistoH_115_120"        "Side01_04_HistoH_120_125"       
## [491] "Side01_04_HistoH_125_130"        "Side01_04_HistoH_130_135"       
## [493] "Side01_04_HistoH_135_140"        "Side01_04_HistoH_140_145"       
## [495] "Side01_04_HistoH_145_150"        "Side01_04_HistoH_150_155"       
## [497] "Side01_04_HistoH_155_160"        "Side01_04_HistoH_160_165"       
## [499] "Side01_04_HistoH_165_170"        "Side01_04_HistoH_170_175"       
## [501] "Side01_04_HistoH_175_180"        "Side01_04_HistoH_180_185"       
## [503] "Side01_04_HistoH_185_190"        "Side01_04_HistoH_190_195"       
## [505] "Side01_04_HistoH_195_200"        "Side01_04_HistoH_200_205"       
## [507] "Side01_04_HistoH_205_210"        "Side01_04_HistoH_210_215"       
## [509] "Side01_04_HistoH_215_220"        "Side01_04_HistoH_220_225"       
## [511] "Side01_04_HistoH_225_230"        "Side01_04_HistoH_230_235"       
## [513] "Side01_04_HistoH_235_240"        "Side01_04_HistoH_240_245"       
## [515] "Side01_04_HistoH_245_250"        "Side01_04_HistoH_250_255"       
## [517] "Side01_04_Greennes_Mean"         "Side01_04_Greennes_Deviation"   
## [519] "Side01_04_BarcodeEnabled"        "Side01_04_BarcodeFound"         
## [521] "Side01_05_row1"                  "Side01_05_area"                 
## [523] "Side01_05_height"                "Side01_05_width"                
## [525] "Side01_05_circularity"           "Side01_05_compactness"          
## [527] "Side01_05_contlength"            "Side01_05_convexity"            
## [529] "Side01_05_rectangularity"        "Side01_05_anisometry"           
## [531] "Side01_05_bulkiness"             "Side01_05_struct_factor"        
## [533] "Side01_05_outer_radius"          "Side01_05_inner_radius"         
## [535] "Side01_05_dist_mean"             "Side01_05_dist_deviation"       
## [537] "Side01_05_roundness"             "Side01_05_holes_num"            
## [539] "Side01_05_areaInMm2"             "Side01_05_heightInMm"           
## [541] "Side01_05_widthInMm"             "Side01_05_Convex_Hull_Area"     
## [543] "Side01_05_AverageColor_H"        "Side01_05_AverageColor_S"       
## [545] "Side01_05_AverageColor_V"        "Side01_05_CenterOfMassX"        
## [547] "Side01_05_CenterOfMassY"         "Side01_05_CenterOfMassDistance" 
## [549] "Side01_05_H_Mean"                "Side01_05_H_Median"             
## [551] "Side01_05_H_StDev"               "Side01_05_H_Q1"                 
## [553] "Side01_05_H_Q3"                  "Side01_05_brown(H_14_27)"       
## [555] "Side01_05_brown-yellow(H_28_35)" "Side01_05_yellow(H_36_43)"      
## [557] "Side01_05_yellow-green(H_44_57)" "Side01_05_green(H_58_99)"       
## [559] "Side01_05_green-cyan(H_100_120)" "Side01_05_cyan-blue(H_121_142)" 
## [561] "Side01_05_blue(H_143_156)"       "Side01_05_HistoH_0_5"           
## [563] "Side01_05_HistoH_5_10"           "Side01_05_HistoH_10_15"         
## [565] "Side01_05_HistoH_15_20"          "Side01_05_HistoH_20_25"         
## [567] "Side01_05_HistoH_25_30"          "Side01_05_HistoH_30_35"         
## [569] "Side01_05_HistoH_35_40"          "Side01_05_HistoH_40_45"         
## [571] "Side01_05_HistoH_45_50"          "Side01_05_HistoH_50_55"         
## [573] "Side01_05_HistoH_55_60"          "Side01_05_HistoH_60_65"         
## [575] "Side01_05_HistoH_65_70"          "Side01_05_HistoH_70_75"         
## [577] "Side01_05_HistoH_75_80"          "Side01_05_HistoH_80_85"         
## [579] "Side01_05_HistoH_85_90"          "Side01_05_HistoH_90_95"         
## [581] "Side01_05_HistoH_95_100"         "Side01_05_HistoH_100_105"       
## [583] "Side01_05_HistoH_105_110"        "Side01_05_HistoH_110_115"       
## [585] "Side01_05_HistoH_115_120"        "Side01_05_HistoH_120_125"       
## [587] "Side01_05_HistoH_125_130"        "Side01_05_HistoH_130_135"       
## [589] "Side01_05_HistoH_135_140"        "Side01_05_HistoH_140_145"       
## [591] "Side01_05_HistoH_145_150"        "Side01_05_HistoH_150_155"       
## [593] "Side01_05_HistoH_155_160"        "Side01_05_HistoH_160_165"       
## [595] "Side01_05_HistoH_165_170"        "Side01_05_HistoH_170_175"       
## [597] "Side01_05_HistoH_175_180"        "Side01_05_HistoH_180_185"       
## [599] "Side01_05_HistoH_185_190"        "Side01_05_HistoH_190_195"       
## [601] "Side01_05_HistoH_195_200"        "Side01_05_HistoH_200_205"       
## [603] "Side01_05_HistoH_205_210"        "Side01_05_HistoH_210_215"       
## [605] "Side01_05_HistoH_215_220"        "Side01_05_HistoH_220_225"       
## [607] "Side01_05_HistoH_225_230"        "Side01_05_HistoH_230_235"       
## [609] "Side01_05_HistoH_235_240"        "Side01_05_HistoH_240_245"       
## [611] "Side01_05_HistoH_245_250"        "Side01_05_HistoH_250_255"       
## [613] "Side01_05_Greennes_Mean"         "Side01_05_Greennes_Deviation"   
## [615] "Side01_05_BarcodeEnabled"        "Side01_05_BarcodeFound"         
## [617] "row1"                            "area"                           
## [619] "height"                          "width"                          
## [621] "circularity"                     "compactness"                    
## [623] "contlength"                      "convexity"                      
## [625] "rectangularity"                  "anisometry"                     
## [627] "bulkiness"                       "struct_factor"                  
## [629] "outer_radius"                    "inner_radius"                   
## [631] "dist_mean"                       "dist_deviation"                 
## [633] "roundness"                       "holes_num"                      
## [635] "areaInMm2"                       "heightInMm"                     
## [637] "widthInMm"                       "Convex_Hull_Area"               
## [639] "AverageColor_H"                  "AverageColor_S"                 
## [641] "AverageColor_V"                  "CenterOfMassX"                  
## [643] "CenterOfMassY"                   "CenterOfMassDistance"           
## [645] "H_Mean"                          "H_Median"                       
## [647] "H_StDev"                         "H_Q1"                           
## [649] "H_Q3"                            "brown(H_14_27)"                 
## [651] "brown-yellow(H_28_35)"           "yellow(H_36_43)"                
## [653] "yellow-green(H_44_57)"           "green(H_58_99)"                 
## [655] "green-cyan(H_100_120)"           "cyan-blue(H_121_142)"           
## [657] "blue(H_143_156)"                 "HistoH_0_5"                     
## [659] "HistoH_5_10"                     "HistoH_10_15"                   
## [661] "HistoH_15_20"                    "HistoH_20_25"                   
## [663] "HistoH_25_30"                    "HistoH_30_35"                   
## [665] "HistoH_35_40"                    "HistoH_40_45"                   
## [667] "HistoH_45_50"                    "HistoH_50_55"                   
## [669] "HistoH_55_60"                    "HistoH_60_65"                   
## [671] "HistoH_65_70"                    "HistoH_70_75"                   
## [673] "HistoH_75_80"                    "HistoH_80_85"

Let’s isolate only the area data for now - to see what we get from this:

unique(RGB$measurement_name)
##   [1] "Rfid"                            "Side01_00_row1"                 
##   [3] "Side01_00_area"                  "Side01_00_height"               
##   [5] "Side01_00_width"                 "Side01_00_circularity"          
##   [7] "Side01_00_compactness"           "Side01_00_contlength"           
##   [9] "Side01_00_convexity"             "Side01_00_rectangularity"       
##  [11] "Side01_00_anisometry"            "Side01_00_bulkiness"            
##  [13] "Side01_00_struct_factor"         "Side01_00_outer_radius"         
##  [15] "Side01_00_inner_radius"          "Side01_00_dist_mean"            
##  [17] "Side01_00_dist_deviation"        "Side01_00_roundness"            
##  [19] "Side01_00_holes_num"             "Side01_00_areaInMm2"            
##  [21] "Side01_00_heightInMm"            "Side01_00_widthInMm"            
##  [23] "Side01_00_Convex_Hull_Area"      "Side01_00_AverageColor_H"       
##  [25] "Side01_00_AverageColor_S"        "Side01_00_AverageColor_V"       
##  [27] "Side01_00_CenterOfMassX"         "Side01_00_CenterOfMassY"        
##  [29] "Side01_00_CenterOfMassDistance"  "Side01_00_H_Mean"               
##  [31] "Side01_00_H_Median"              "Side01_00_H_StDev"              
##  [33] "Side01_00_H_Q1"                  "Side01_00_H_Q3"                 
##  [35] "Side01_00_brown(H_14_27)"        "Side01_00_brown-yellow(H_28_35)"
##  [37] "Side01_00_yellow(H_36_43)"       "Side01_00_yellow-green(H_44_57)"
##  [39] "Side01_00_green(H_58_99)"        "Side01_00_green-cyan(H_100_120)"
##  [41] "Side01_00_cyan-blue(H_121_142)"  "Side01_00_blue(H_143_156)"      
##  [43] "Side01_00_HistoH_0_5"            "Side01_00_HistoH_5_10"          
##  [45] "Side01_00_HistoH_10_15"          "Side01_00_HistoH_15_20"         
##  [47] "Side01_00_HistoH_20_25"          "Side01_00_HistoH_25_30"         
##  [49] "Side01_00_HistoH_30_35"          "Side01_00_HistoH_35_40"         
##  [51] "Side01_00_HistoH_40_45"          "Side01_00_HistoH_45_50"         
##  [53] "Side01_00_HistoH_50_55"          "Side01_00_HistoH_55_60"         
##  [55] "Side01_00_HistoH_60_65"          "Side01_00_HistoH_65_70"         
##  [57] "Side01_00_HistoH_70_75"          "Side01_00_HistoH_75_80"         
##  [59] "Side01_00_HistoH_80_85"          "Side01_00_HistoH_85_90"         
##  [61] "Side01_00_HistoH_90_95"          "Side01_00_HistoH_95_100"        
##  [63] "Side01_00_HistoH_100_105"        "Side01_00_HistoH_105_110"       
##  [65] "Side01_00_HistoH_110_115"        "Side01_00_HistoH_115_120"       
##  [67] "Side01_00_HistoH_120_125"        "Side01_00_HistoH_125_130"       
##  [69] "Side01_00_HistoH_130_135"        "Side01_00_HistoH_135_140"       
##  [71] "Side01_00_HistoH_140_145"        "Side01_00_HistoH_145_150"       
##  [73] "Side01_00_HistoH_150_155"        "Side01_00_HistoH_155_160"       
##  [75] "Side01_00_HistoH_160_165"        "Side01_00_HistoH_165_170"       
##  [77] "Side01_00_HistoH_170_175"        "Side01_00_HistoH_175_180"       
##  [79] "Side01_00_HistoH_180_185"        "Side01_00_HistoH_185_190"       
##  [81] "Side01_00_HistoH_190_195"        "Side01_00_HistoH_195_200"       
##  [83] "Side01_00_HistoH_200_205"        "Side01_00_HistoH_205_210"       
##  [85] "Side01_00_HistoH_210_215"        "Side01_00_HistoH_215_220"       
##  [87] "Side01_00_HistoH_220_225"        "Side01_00_HistoH_225_230"       
##  [89] "Side01_00_HistoH_230_235"        "Side01_00_HistoH_235_240"       
##  [91] "Side01_00_HistoH_240_245"        "Side01_00_HistoH_245_250"       
##  [93] "Side01_00_HistoH_250_255"        "Side01_00_Greennes_Mean"        
##  [95] "Side01_00_Greennes_Deviation"    "Side01_00_BarcodeEnabled"       
##  [97] "Side01_00_BarcodeFound"          "BarcodeResult"                  
##  [99] "Side01_01_row1"                  "Side01_01_area"                 
## [101] "Side01_01_height"                "Side01_01_width"                
## [103] "Side01_01_circularity"           "Side01_01_compactness"          
## [105] "Side01_01_contlength"            "Side01_01_convexity"            
## [107] "Side01_01_rectangularity"        "Side01_01_anisometry"           
## [109] "Side01_01_bulkiness"             "Side01_01_struct_factor"        
## [111] "Side01_01_outer_radius"          "Side01_01_inner_radius"         
## [113] "Side01_01_dist_mean"             "Side01_01_dist_deviation"       
## [115] "Side01_01_roundness"             "Side01_01_holes_num"            
## [117] "Side01_01_areaInMm2"             "Side01_01_heightInMm"           
## [119] "Side01_01_widthInMm"             "Side01_01_Convex_Hull_Area"     
## [121] "Side01_01_AverageColor_H"        "Side01_01_AverageColor_S"       
## [123] "Side01_01_AverageColor_V"        "Side01_01_CenterOfMassX"        
## [125] "Side01_01_CenterOfMassY"         "Side01_01_CenterOfMassDistance" 
## [127] "Side01_01_H_Mean"                "Side01_01_H_Median"             
## [129] "Side01_01_H_StDev"               "Side01_01_H_Q1"                 
## [131] "Side01_01_H_Q3"                  "Side01_01_brown(H_14_27)"       
## [133] "Side01_01_brown-yellow(H_28_35)" "Side01_01_yellow(H_36_43)"      
## [135] "Side01_01_yellow-green(H_44_57)" "Side01_01_green(H_58_99)"       
## [137] "Side01_01_green-cyan(H_100_120)" "Side01_01_cyan-blue(H_121_142)" 
## [139] "Side01_01_blue(H_143_156)"       "Side01_01_HistoH_0_5"           
## [141] "Side01_01_HistoH_5_10"           "Side01_01_HistoH_10_15"         
## [143] "Side01_01_HistoH_15_20"          "Side01_01_HistoH_20_25"         
## [145] "Side01_01_HistoH_25_30"          "Side01_01_HistoH_30_35"         
## [147] "Side01_01_HistoH_35_40"          "Side01_01_HistoH_40_45"         
## [149] "Side01_01_HistoH_45_50"          "Side01_01_HistoH_50_55"         
## [151] "Side01_01_HistoH_55_60"          "Side01_01_HistoH_60_65"         
## [153] "Side01_01_HistoH_65_70"          "Side01_01_HistoH_70_75"         
## [155] "Side01_01_HistoH_75_80"          "Side01_01_HistoH_80_85"         
## [157] "Side01_01_HistoH_85_90"          "Side01_01_HistoH_90_95"         
## [159] "Side01_01_HistoH_95_100"         "Side01_01_HistoH_100_105"       
## [161] "Side01_01_HistoH_105_110"        "Side01_01_HistoH_110_115"       
## [163] "Side01_01_HistoH_115_120"        "Side01_01_HistoH_120_125"       
## [165] "Side01_01_HistoH_125_130"        "Side01_01_HistoH_130_135"       
## [167] "Side01_01_HistoH_135_140"        "Side01_01_HistoH_140_145"       
## [169] "Side01_01_HistoH_145_150"        "Side01_01_HistoH_150_155"       
## [171] "Side01_01_HistoH_155_160"        "Side01_01_HistoH_160_165"       
## [173] "Side01_01_HistoH_165_170"        "Side01_01_HistoH_170_175"       
## [175] "Side01_01_HistoH_175_180"        "Side01_01_HistoH_180_185"       
## [177] "Side01_01_HistoH_185_190"        "Side01_01_HistoH_190_195"       
## [179] "Side01_01_HistoH_195_200"        "Side01_01_HistoH_200_205"       
## [181] "Side01_01_HistoH_205_210"        "Side01_01_HistoH_210_215"       
## [183] "Side01_01_HistoH_215_220"        "Side01_01_HistoH_220_225"       
## [185] "Side01_01_HistoH_225_230"        "Side01_01_HistoH_230_235"       
## [187] "Side01_01_HistoH_235_240"        "Side01_01_HistoH_240_245"       
## [189] "Side01_01_HistoH_245_250"        "Side01_01_HistoH_250_255"       
## [191] "Side01_01_Greennes_Mean"         "Side01_01_Greennes_Deviation"   
## [193] "Side01_01_BarcodeEnabled"        "Side01_01_BarcodeFound"         
## [195] "Side01_02_row1"                  "Side01_02_area"                 
## [197] "Side01_02_height"                "Side01_02_width"                
## [199] "Side01_02_circularity"           "Side01_02_compactness"          
## [201] "Side01_02_contlength"            "Side01_02_convexity"            
## [203] "Side01_02_rectangularity"        "Side01_02_anisometry"           
## [205] "Side01_02_bulkiness"             "Side01_02_struct_factor"        
## [207] "Side01_02_outer_radius"          "Side01_02_inner_radius"         
## [209] "Side01_02_dist_mean"             "Side01_02_dist_deviation"       
## [211] "Side01_02_roundness"             "Side01_02_holes_num"            
## [213] "Side01_02_areaInMm2"             "Side01_02_heightInMm"           
## [215] "Side01_02_widthInMm"             "Side01_02_Convex_Hull_Area"     
## [217] "Side01_02_AverageColor_H"        "Side01_02_AverageColor_S"       
## [219] "Side01_02_AverageColor_V"        "Side01_02_CenterOfMassX"        
## [221] "Side01_02_CenterOfMassY"         "Side01_02_CenterOfMassDistance" 
## [223] "Side01_02_H_Mean"                "Side01_02_H_Median"             
## [225] "Side01_02_H_StDev"               "Side01_02_H_Q1"                 
## [227] "Side01_02_H_Q3"                  "Side01_02_brown(H_14_27)"       
## [229] "Side01_02_brown-yellow(H_28_35)" "Side01_02_yellow(H_36_43)"      
## [231] "Side01_02_yellow-green(H_44_57)" "Side01_02_green(H_58_99)"       
## [233] "Side01_02_green-cyan(H_100_120)" "Side01_02_cyan-blue(H_121_142)" 
## [235] "Side01_02_blue(H_143_156)"       "Side01_02_HistoH_0_5"           
## [237] "Side01_02_HistoH_5_10"           "Side01_02_HistoH_10_15"         
## [239] "Side01_02_HistoH_15_20"          "Side01_02_HistoH_20_25"         
## [241] "Side01_02_HistoH_25_30"          "Side01_02_HistoH_30_35"         
## [243] "Side01_02_HistoH_35_40"          "Side01_02_HistoH_40_45"         
## [245] "Side01_02_HistoH_45_50"          "Side01_02_HistoH_50_55"         
## [247] "Side01_02_HistoH_55_60"          "Side01_02_HistoH_60_65"         
## [249] "Side01_02_HistoH_65_70"          "Side01_02_HistoH_70_75"         
## [251] "Side01_02_HistoH_75_80"          "Side01_02_HistoH_80_85"         
## [253] "Side01_02_HistoH_85_90"          "Side01_02_HistoH_90_95"         
## [255] "Side01_02_HistoH_95_100"         "Side01_02_HistoH_100_105"       
## [257] "Side01_02_HistoH_105_110"        "Side01_02_HistoH_110_115"       
## [259] "Side01_02_HistoH_115_120"        "Side01_02_HistoH_120_125"       
## [261] "Side01_02_HistoH_125_130"        "Side01_02_HistoH_130_135"       
## [263] "Side01_02_HistoH_135_140"        "Side01_02_HistoH_140_145"       
## [265] "Side01_02_HistoH_145_150"        "Side01_02_HistoH_150_155"       
## [267] "Side01_02_HistoH_155_160"        "Side01_02_HistoH_160_165"       
## [269] "Side01_02_HistoH_165_170"        "Side01_02_HistoH_170_175"       
## [271] "Side01_02_HistoH_175_180"        "Side01_02_HistoH_180_185"       
## [273] "Side01_02_HistoH_185_190"        "Side01_02_HistoH_190_195"       
## [275] "Side01_02_HistoH_195_200"        "Side01_02_HistoH_200_205"       
## [277] "Side01_02_HistoH_205_210"        "Side01_02_HistoH_210_215"       
## [279] "Side01_02_HistoH_215_220"        "Side01_02_HistoH_220_225"       
## [281] "Side01_02_HistoH_225_230"        "Side01_02_HistoH_230_235"       
## [283] "Side01_02_HistoH_235_240"        "Side01_02_HistoH_240_245"       
## [285] "Side01_02_HistoH_245_250"        "Side01_02_HistoH_250_255"       
## [287] "Side01_02_Greennes_Mean"         "Side01_02_Greennes_Deviation"   
## [289] "Side01_02_BarcodeEnabled"        "Side01_02_BarcodeFound"         
## [291] "Side01_03_row1"                  "Side01_03_area"                 
## [293] "Side01_03_height"                "Side01_03_width"                
## [295] "Side01_03_circularity"           "Side01_03_compactness"          
## [297] "Side01_03_contlength"            "Side01_03_convexity"            
## [299] "Side01_03_rectangularity"        "Side01_03_anisometry"           
## [301] "Side01_03_bulkiness"             "Side01_03_struct_factor"        
## [303] "Side01_03_outer_radius"          "Side01_03_inner_radius"         
## [305] "Side01_03_dist_mean"             "Side01_03_dist_deviation"       
## [307] "Side01_03_roundness"             "Side01_03_holes_num"            
## [309] "Side01_03_areaInMm2"             "Side01_03_heightInMm"           
## [311] "Side01_03_widthInMm"             "Side01_03_Convex_Hull_Area"     
## [313] "Side01_03_AverageColor_H"        "Side01_03_AverageColor_S"       
## [315] "Side01_03_AverageColor_V"        "Side01_03_CenterOfMassX"        
## [317] "Side01_03_CenterOfMassY"         "Side01_03_CenterOfMassDistance" 
## [319] "Side01_03_H_Mean"                "Side01_03_H_Median"             
## [321] "Side01_03_H_StDev"               "Side01_03_H_Q1"                 
## [323] "Side01_03_H_Q3"                  "Side01_03_brown(H_14_27)"       
## [325] "Side01_03_brown-yellow(H_28_35)" "Side01_03_yellow(H_36_43)"      
## [327] "Side01_03_yellow-green(H_44_57)" "Side01_03_green(H_58_99)"       
## [329] "Side01_03_green-cyan(H_100_120)" "Side01_03_cyan-blue(H_121_142)" 
## [331] "Side01_03_blue(H_143_156)"       "Side01_03_HistoH_0_5"           
## [333] "Side01_03_HistoH_5_10"           "Side01_03_HistoH_10_15"         
## [335] "Side01_03_HistoH_15_20"          "Side01_03_HistoH_20_25"         
## [337] "Side01_03_HistoH_25_30"          "Side01_03_HistoH_30_35"         
## [339] "Side01_03_HistoH_35_40"          "Side01_03_HistoH_40_45"         
## [341] "Side01_03_HistoH_45_50"          "Side01_03_HistoH_50_55"         
## [343] "Side01_03_HistoH_55_60"          "Side01_03_HistoH_60_65"         
## [345] "Side01_03_HistoH_65_70"          "Side01_03_HistoH_70_75"         
## [347] "Side01_03_HistoH_75_80"          "Side01_03_HistoH_80_85"         
## [349] "Side01_03_HistoH_85_90"          "Side01_03_HistoH_90_95"         
## [351] "Side01_03_HistoH_95_100"         "Side01_03_HistoH_100_105"       
## [353] "Side01_03_HistoH_105_110"        "Side01_03_HistoH_110_115"       
## [355] "Side01_03_HistoH_115_120"        "Side01_03_HistoH_120_125"       
## [357] "Side01_03_HistoH_125_130"        "Side01_03_HistoH_130_135"       
## [359] "Side01_03_HistoH_135_140"        "Side01_03_HistoH_140_145"       
## [361] "Side01_03_HistoH_145_150"        "Side01_03_HistoH_150_155"       
## [363] "Side01_03_HistoH_155_160"        "Side01_03_HistoH_160_165"       
## [365] "Side01_03_HistoH_165_170"        "Side01_03_HistoH_170_175"       
## [367] "Side01_03_HistoH_175_180"        "Side01_03_HistoH_180_185"       
## [369] "Side01_03_HistoH_185_190"        "Side01_03_HistoH_190_195"       
## [371] "Side01_03_HistoH_195_200"        "Side01_03_HistoH_200_205"       
## [373] "Side01_03_HistoH_205_210"        "Side01_03_HistoH_210_215"       
## [375] "Side01_03_HistoH_215_220"        "Side01_03_HistoH_220_225"       
## [377] "Side01_03_HistoH_225_230"        "Side01_03_HistoH_230_235"       
## [379] "Side01_03_HistoH_235_240"        "Side01_03_HistoH_240_245"       
## [381] "Side01_03_HistoH_245_250"        "Side01_03_HistoH_250_255"       
## [383] "Side01_03_Greennes_Mean"         "Side01_03_Greennes_Deviation"   
## [385] "Side01_03_BarcodeEnabled"        "Side01_03_BarcodeFound"         
## [387] "Side01_04_row1"                  "Side01_04_area"                 
## [389] "Side01_04_height"                "Side01_04_width"                
## [391] "Side01_04_circularity"           "Side01_04_compactness"          
## [393] "Side01_04_contlength"            "Side01_04_convexity"            
## [395] "Side01_04_rectangularity"        "Side01_04_anisometry"           
## [397] "Side01_04_bulkiness"             "Side01_04_struct_factor"        
## [399] "Side01_04_outer_radius"          "Side01_04_inner_radius"         
## [401] "Side01_04_dist_mean"             "Side01_04_dist_deviation"       
## [403] "Side01_04_roundness"             "Side01_04_holes_num"            
## [405] "Side01_04_areaInMm2"             "Side01_04_heightInMm"           
## [407] "Side01_04_widthInMm"             "Side01_04_Convex_Hull_Area"     
## [409] "Side01_04_AverageColor_H"        "Side01_04_AverageColor_S"       
## [411] "Side01_04_AverageColor_V"        "Side01_04_CenterOfMassX"        
## [413] "Side01_04_CenterOfMassY"         "Side01_04_CenterOfMassDistance" 
## [415] "Side01_04_H_Mean"                "Side01_04_H_Median"             
## [417] "Side01_04_H_StDev"               "Side01_04_H_Q1"                 
## [419] "Side01_04_H_Q3"                  "Side01_04_brown(H_14_27)"       
## [421] "Side01_04_brown-yellow(H_28_35)" "Side01_04_yellow(H_36_43)"      
## [423] "Side01_04_yellow-green(H_44_57)" "Side01_04_green(H_58_99)"       
## [425] "Side01_04_green-cyan(H_100_120)" "Side01_04_cyan-blue(H_121_142)" 
## [427] "Side01_04_blue(H_143_156)"       "Side01_04_HistoH_0_5"           
## [429] "Side01_04_HistoH_5_10"           "Side01_04_HistoH_10_15"         
## [431] "Side01_04_HistoH_15_20"          "Side01_04_HistoH_20_25"         
## [433] "Side01_04_HistoH_25_30"          "Side01_04_HistoH_30_35"         
## [435] "Side01_04_HistoH_35_40"          "Side01_04_HistoH_40_45"         
## [437] "Side01_04_HistoH_45_50"          "Side01_04_HistoH_50_55"         
## [439] "Side01_04_HistoH_55_60"          "Side01_04_HistoH_60_65"         
## [441] "Side01_04_HistoH_65_70"          "Side01_04_HistoH_70_75"         
## [443] "Side01_04_HistoH_75_80"          "Side01_04_HistoH_80_85"         
## [445] "Side01_04_HistoH_85_90"          "Side01_04_HistoH_90_95"         
## [447] "Side01_04_HistoH_95_100"         "Side01_04_HistoH_100_105"       
## [449] "Side01_04_HistoH_105_110"        "Side01_04_HistoH_110_115"       
## [451] "Side01_04_HistoH_115_120"        "Side01_04_HistoH_120_125"       
## [453] "Side01_04_HistoH_125_130"        "Side01_04_HistoH_130_135"       
## [455] "Side01_04_HistoH_135_140"        "Side01_04_HistoH_140_145"       
## [457] "Side01_04_HistoH_145_150"        "Side01_04_HistoH_150_155"       
## [459] "Side01_04_HistoH_155_160"        "Side01_04_HistoH_160_165"       
## [461] "Side01_04_HistoH_165_170"        "Side01_04_HistoH_170_175"       
## [463] "Side01_04_HistoH_175_180"        "Side01_04_HistoH_180_185"       
## [465] "Side01_04_HistoH_185_190"        "Side01_04_HistoH_190_195"       
## [467] "Side01_04_HistoH_195_200"        "Side01_04_HistoH_200_205"       
## [469] "Side01_04_HistoH_205_210"        "Side01_04_HistoH_210_215"       
## [471] "Side01_04_HistoH_215_220"        "Side01_04_HistoH_220_225"       
## [473] "Side01_04_HistoH_225_230"        "Side01_04_HistoH_230_235"       
## [475] "Side01_04_HistoH_235_240"        "Side01_04_HistoH_240_245"       
## [477] "Side01_04_HistoH_245_250"        "Side01_04_HistoH_250_255"       
## [479] "Side01_04_Greennes_Mean"         "Side01_04_Greennes_Deviation"   
## [481] "Side01_04_BarcodeEnabled"        "Side01_04_BarcodeFound"         
## [483] "Side01_05_row1"                  "Side01_05_area"                 
## [485] "Side01_05_height"                "Side01_05_width"                
## [487] "Side01_05_circularity"           "Side01_05_compactness"          
## [489] "Side01_05_contlength"            "Side01_05_convexity"            
## [491] "Side01_05_rectangularity"        "Side01_05_anisometry"           
## [493] "Side01_05_bulkiness"             "Side01_05_struct_factor"        
## [495] "Side01_05_outer_radius"          "Side01_05_inner_radius"         
## [497] "Side01_05_dist_mean"             "Side01_05_dist_deviation"       
## [499] "Side01_05_roundness"             "Side01_05_holes_num"            
## [501] "Side01_05_areaInMm2"             "Side01_05_heightInMm"           
## [503] "Side01_05_widthInMm"             "Side01_05_Convex_Hull_Area"     
## [505] "Side01_05_AverageColor_H"        "Side01_05_AverageColor_S"       
## [507] "Side01_05_AverageColor_V"        "Side01_05_CenterOfMassX"        
## [509] "Side01_05_CenterOfMassY"         "Side01_05_CenterOfMassDistance" 
## [511] "Side01_05_H_Mean"                "Side01_05_H_Median"             
## [513] "Side01_05_H_StDev"               "Side01_05_H_Q1"                 
## [515] "Side01_05_H_Q3"                  "Side01_05_brown(H_14_27)"       
## [517] "Side01_05_brown-yellow(H_28_35)" "Side01_05_yellow(H_36_43)"      
## [519] "Side01_05_yellow-green(H_44_57)" "Side01_05_green(H_58_99)"       
## [521] "Side01_05_green-cyan(H_100_120)" "Side01_05_cyan-blue(H_121_142)" 
## [523] "Side01_05_blue(H_143_156)"       "Side01_05_HistoH_0_5"           
## [525] "Side01_05_HistoH_5_10"           "Side01_05_HistoH_10_15"         
## [527] "Side01_05_HistoH_15_20"          "Side01_05_HistoH_20_25"         
## [529] "Side01_05_HistoH_25_30"          "Side01_05_HistoH_30_35"         
## [531] "Side01_05_HistoH_35_40"          "Side01_05_HistoH_40_45"         
## [533] "Side01_05_HistoH_45_50"          "Side01_05_HistoH_50_55"         
## [535] "Side01_05_HistoH_55_60"          "Side01_05_HistoH_60_65"         
## [537] "Side01_05_HistoH_65_70"          "Side01_05_HistoH_70_75"         
## [539] "Side01_05_HistoH_75_80"          "Side01_05_HistoH_80_85"         
## [541] "Side01_05_HistoH_85_90"          "Side01_05_HistoH_90_95"         
## [543] "Side01_05_HistoH_95_100"         "Side01_05_HistoH_100_105"       
## [545] "Side01_05_HistoH_105_110"        "Side01_05_HistoH_110_115"       
## [547] "Side01_05_HistoH_115_120"        "Side01_05_HistoH_120_125"       
## [549] "Side01_05_HistoH_125_130"        "Side01_05_HistoH_130_135"       
## [551] "Side01_05_HistoH_135_140"        "Side01_05_HistoH_140_145"       
## [553] "Side01_05_HistoH_145_150"        "Side01_05_HistoH_150_155"       
## [555] "Side01_05_HistoH_155_160"        "Side01_05_HistoH_160_165"       
## [557] "Side01_05_HistoH_165_170"        "Side01_05_HistoH_170_175"       
## [559] "Side01_05_HistoH_175_180"        "Side01_05_HistoH_180_185"       
## [561] "Side01_05_HistoH_185_190"        "Side01_05_HistoH_190_195"       
## [563] "Side01_05_HistoH_195_200"        "Side01_05_HistoH_200_205"       
## [565] "Side01_05_HistoH_205_210"        "Side01_05_HistoH_210_215"       
## [567] "Side01_05_HistoH_215_220"        "Side01_05_HistoH_220_225"       
## [569] "Side01_05_HistoH_225_230"        "Side01_05_HistoH_230_235"       
## [571] "Side01_05_HistoH_235_240"        "Side01_05_HistoH_240_245"       
## [573] "Side01_05_HistoH_245_250"        "Side01_05_HistoH_250_255"       
## [575] "Side01_05_Greennes_Mean"         "Side01_05_Greennes_Deviation"   
## [577] "Side01_05_BarcodeEnabled"        "Side01_05_BarcodeFound"         
## [579] "row1"                            "area"                           
## [581] "height"                          "width"                          
## [583] "circularity"                     "compactness"                    
## [585] "contlength"                      "convexity"                      
## [587] "rectangularity"                  "anisometry"                     
## [589] "bulkiness"                       "struct_factor"                  
## [591] "outer_radius"                    "inner_radius"                   
## [593] "dist_mean"                       "dist_deviation"                 
## [595] "roundness"                       "holes_num"                      
## [597] "areaInMm2"                       "heightInMm"                     
## [599] "widthInMm"                       "Convex_Hull_Area"               
## [601] "AverageColor_H"                  "AverageColor_S"                 
## [603] "AverageColor_V"                  "CenterOfMassX"                  
## [605] "CenterOfMassY"                   "CenterOfMassDistance"           
## [607] "H_Mean"                          "H_Median"                       
## [609] "H_StDev"                         "H_Q1"                           
## [611] "H_Q3"                            "brown(H_14_27)"                 
## [613] "brown-yellow(H_28_35)"           "yellow(H_36_43)"                
## [615] "yellow-green(H_44_57)"           "green(H_58_99)"                 
## [617] "green-cyan(H_100_120)"           "cyan-blue(H_121_142)"           
## [619] "blue(H_143_156)"                 "HistoH_0_5"                     
## [621] "HistoH_5_10"                     "HistoH_10_15"                   
## [623] "HistoH_15_20"                    "HistoH_20_25"                   
## [625] "HistoH_25_30"                    "HistoH_30_35"                   
## [627] "HistoH_35_40"                    "HistoH_40_45"                   
## [629] "HistoH_45_50"                    "HistoH_50_55"                   
## [631] "HistoH_55_60"                    "HistoH_60_65"                   
## [633] "HistoH_65_70"                    "HistoH_70_75"                   
## [635] "HistoH_75_80"                    "HistoH_80_85"                   
## [637] "HistoH_85_90"                    "HistoH_90_95"                   
## [639] "HistoH_95_100"                   "HistoH_100_105"                 
## [641] "HistoH_105_110"                  "HistoH_110_115"                 
## [643] "HistoH_115_120"                  "HistoH_120_125"                 
## [645] "HistoH_125_130"                  "HistoH_130_135"                 
## [647] "HistoH_135_140"                  "HistoH_140_145"                 
## [649] "HistoH_145_150"                  "HistoH_150_155"                 
## [651] "HistoH_155_160"                  "HistoH_160_165"                 
## [653] "HistoH_165_170"                  "HistoH_170_175"                 
## [655] "HistoH_175_180"                  "HistoH_180_185"                 
## [657] "HistoH_185_190"                  "HistoH_190_195"                 
## [659] "HistoH_195_200"                  "HistoH_200_205"                 
## [661] "HistoH_205_210"                  "HistoH_210_215"                 
## [663] "HistoH_215_220"                  "HistoH_220_225"                 
## [665] "HistoH_225_230"                  "HistoH_230_235"                 
## [667] "HistoH_235_240"                  "HistoH_240_245"                 
## [669] "HistoH_245_250"                  "HistoH_250_255"                 
## [671] "Greennes_Mean"                   "Greennes_Deviation"             
## [673] "BarcodeEnabled"                  "BarcodeFound"
want <- c("Side01_00_area", "Side01_01_area", "Side01_02_area", "Side01_03_area", "Side01_04_area", "Side01_05_area", "area")
RGB_Area <- subset(RGB2, RGB2$measurement_name %in% want)
RGB_Area
RGB_Area <- RGB_Area[,c(1,4:6)]
RGB_Area
library(reshape2)
RGB_Area2 <- RGB_Area[,c(1:2,4,3)]
cRGB_Area <- dcast(RGB_Area2, timestamp + tray.ID ~ measurement_name)
## Using measurement_value as value column: use value.var to override.
cRGB_Area

not sure what all of the missing values are about - but lets remove them.

nona.RGB_Area <- na.omit(cRGB_Area)
nona.RGB_Area
unique(nona.RGB_Area$tray.ID)
##  [1] 34872 34873 34874 34875 34876 34853 34854 34856 34857 34859 34862 34863
## [13] 34867 34868 34869 34870 34871

now let’s summarize the area from top view and 6 different angles into one value:

nona.RGB_Area$Area.all <- nona.RGB_Area$area + nona.RGB_Area$Side01_00_area + nona.RGB_Area$Side01_01_area + nona.RGB_Area$Side01_02_area + nona.RGB_Area$Side01_03_area + nona.RGB_Area$Side01_04_area + nona.RGB_Area$Side01_05_area
nona.RGB_Area

One last remaining thing would be to resolve the timestamp into the “Day of experiment”. First let’s split it into a date and time:

# date
strsplit(nona.RGB_Area$timestamp[1], "-")[[1]][1]
## [1] "20240608"
# time
strsplit(nona.RGB_Area$timestamp[1], "-")[[1]][2]
## [1] "174413"

now for all of the rows:

for(i in 1:nrow(nona.RGB_Area)){
  nona.RGB_Area$date[i] <-  strsplit(nona.RGB_Area$timestamp[i], "-")[[1]][1]
  nona.RGB_Area$time[i] <-  strsplit(nona.RGB_Area$timestamp[i], "-")[[1]][2]
}

nona.RGB_Area

plot the RGB data

library(ggplot2)
nona.RGB_Area$date <- as.factor(nona.RGB_Area$date)
nona.RGB_Area
unique(nona.RGB_Area$date)
## [1] 20240608 20240609 20240610
## Levels: 20240608 20240609 20240610
nona.RGB_AreaD <- merge(nona.RGB_Area, decode, by= "tray.ID", all=T)
nona.RGB_AreaD
library(ggsci)
library(ggpubr)

LD <- ggerrorplot(nona.RGB_AreaD, x = "Genotype", y = "Area.all", color = "Genotype", fill = "Genotype", facet.by = c( "treatment","date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "digital biomass (a.u.)", add.params = list(color = "darkgray")) 
LD <- LD + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = F)
LD <- LD + rremove("legend") + scale_color_d3("category10") 
LD

OK - that looks great - now let’s move onto PS2 data:

PS2 data loading

PS2 <- read.csv("MMJ_Carmen_StarchMutants_20240621.csv")
PS2

remove “all” from my Object number analyzed results:

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] "dFv.Fm"         "s.e."           "F0"             "s.e..1"        
##  [13] "Fj"             "s.e..2"         "Fi"             "s.e..3"        
##  [17] "Fm"             "s.e..4"         "X1.Fj.Fm"       "s.e..5"        
##  [21] "X1.Fi.Fm"       "s.e..6"         "Fv.Fm"          "s.e..7"        
##  [25] "IC.Area"        "s.e..8"         "IC.Area.Fv"     "s.e..9"        
##  [29] "PI"             "s.e..10"        "dFq.Fm"         "s.e..11"       
##  [33] "Fs."            "s.e..12"        "Fm."            "s.e..13"       
##  [37] "Fq..Fm."        "s.e..14"        "rETR"           "s.e..15"       
##  [41] "dRfd"           "s.e..16"        "RfdFm"          "s.e..17"       
##  [45] "RfdFt"          "s.e..18"        "Rfd"            "s.e..19"       
##  [49] "Rfd.I..px."     "Rfd.I...."      "Rfd.II..px."    "Rfd.II...."    
##  [53] "Rfd.III..px."   "Rfd.III...."    "Rfd.IV..px."    "Rfd.IV...."    
##  [57] "Rfd.V..px."     "Rfd.V...."      "NPQ"            "s.e..20"       
##  [61] "F0."            "s.e..21"        "qP"             "s.e..22"       
##  [65] "qN"             "s.e..23"        "qL"             "s.e..24"       
##  [69] "qE"             "s.e..25"        "qI"             "s.e..26"       
##  [73] "X.Ñno"          "s.e..27"        "X.Ñnpq"         "s.e..28"       
##  [77] "npq.t."         "s.e..29"        "Red"            "s.e..30"       
##  [81] "Green"          "s.e..31"        "Blue"           "s.e..32"       
##  [85] "Hue"            "s.e..33"        "Saturation"     "s.e..34"       
##  [89] "Value"          "s.e..35"        "SpcGrn"         "s.e..36"       
##  [93] "FarRed"         "s.e..37"        "Nir"            "s.e..38"       
##  [97] "ChlIdx"         "s.e..39"        "AriIdx"         "s.e..40"       
## [101] "NDVI"           "s.e..41"        "dGfp"           "s.e..42"       
## [105] "Gfp"            "s.e..43"        "Auto"           "s.e..44"       
## [109] "cGfp"           "s.e..45"        "MaskGfp"        "nObjGfp"       
## [113] "nObjSize"       "s.e..46"        "Gfp.I..px."     "Gfp.I...."     
## [117] "Gfp.II..px."    "Gfp.II...."     "Gfp.III..px."   "Gfp.III...."   
## [121] "Gfp.IV..px."    "Gfp.IV...."     "Gfp.V..px."     "Gfp.V...."     
## [125] "dRfp"           "s.e..47"        "Rfp"            "s.e..48"       
## [129] "MaskRfp"        "nObjRfp"        "nObjSize.1"     "s.e..49"       
## [133] "Rfp.I..px."     "Rfp.I...."      "Rfp.II..px."    "Rfp.II...."    
## [137] "Rfp.III..px."   "Rfp.III...."    "Rfp.IV..px."    "Rfp.IV...."    
## [141] "Rfp.V..px."     "Rfp.V...."      "dChl"           "s.e..50"       
## [145] "Chl"            "s.e..51"        "aRed"           "s.e..52"       
## [149] "aFarRed"        "s.e..53"        "Alpha"          "s.e..54"       
## [153] "Border"         "Mask.Border"    "Points"         "Area..CH."     
## [157] "Mask.Area..CH." "X.Centre"       "Y.Centre"       "Radius"        
## [161] "Area..MC."      "Mask.Area..MC." "Size..SK."      "Junction..SK." 
## [165] "Endpoint..SK."  "Path..SK."
PS4 <- PS3[,c(1:3,23, 37, 59,77,97,99, 101)]
PS4
PS4$Date <- as.factor(PS4$Date)
lgraph <- ggplot(data=PS4, aes(x= Date, y=ChlIdx)) 
lgraph <- lgraph + geom_point(alpha = 0.7) 
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] "34853"

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]
}

PS4
lgraph <- ggplot(data=PS4, aes(x= Date, y=ChlIdx, group = tray.ID)) 
lgraph <- lgraph + geom_line(alpha = 0.7) 
lgraph <- lgraph + ylab("Chlorophylll Index") + xlab("days after stress")
lgraph

the straight lines at the date are signifying that there are more than one measurement taken per day - so we maybe plot it per round ID instead. But first we need to isolate it from File name again o_O’

gsub(".INF", "", strsplit(PS4$File[1], "_")[[1]][4])
## [1] "2"

Now - lets isolate it for the entire data sheet:

for(i in 1:nrow(PS4)){
  PS4$Round.ID[i] <- gsub(".INF", "", strsplit(PS4$File[i], "_")[[1]][4])
}

PS4

Let;s try to replot it:

lgraph <- ggplot(data=PS4, aes(x= Round.ID, y=ChlIdx, group = tray.ID)) 
lgraph <- lgraph + geom_line(alpha = 0.7) 
lgraph <- lgraph + ylab("Chlorophylll Index") + xlab("rounds of imaging")
lgraph

Now - let’s try to figure out what are our treatments

What are our TrayIDs again here:

unique(PS4$tray.ID)
##  [1] "34853" "34854" "34855" "34856" "34857" "34858" "34859" "34860" "34861"
## [10] "34862" "34863" "34864" "34865" "34866" "34867" "34868" "34869" "34870"
## [19] "34871" "34872" "34873" "34874" "34875" "34876"

Lets upload decoding file:

decode <- read.csv("Carmen_Decode.csv")
decode
colnames(PS4)
##  [1] "File"     "Date"     "Time"     "Fv.Fm"    "Fq..Fm."  "NPQ"     
##  [7] "npq.t."   "ChlIdx"   "AriIdx"   "NDVI"     "tray.ID"  "Round.ID"
colnames(decode)
## [1] "tray.ID"   "treatment" "Genotype"
colnames(decode)[1] <- "tray.ID"
colnames(decode)
## [1] "tray.ID"   "treatment" "Genotype"
PS4deco <- merge(PS4, decode, by = "tray.ID", all = T)
PS4deco
lgraph <- ggplot(data=PS4deco, aes(x= Round.ID, y=ChlIdx, group = tray.ID, color = Genotype)) 
lgraph <- lgraph + geom_line(alpha = 0.7) 
lgraph <- lgraph + ylab("Chlorophylll Index") + xlab("rounds of imaging")
lgraph

Wait - but this round numbering does not make sense!!!! Let’s change it to something that does.. Maybe numeric?

PS4deco$Round.ID <- as.numeric(PS4deco$Round.ID)

lgraph <- ggplot(data=PS4deco, aes(x= Round.ID, y=ChlIdx, group = tray.ID, color = Genotype)) 
lgraph <- lgraph + geom_line(alpha = 0.7) 
lgraph <- lgraph + ylab("Chlorophylll Index") + xlab("rounds of imaging")
lgraph

This is all good - but let’s layer some more stats info onto this - like average trend line +/- SE;

library(ggpubr)
PS4deco
ChlIdx <- ggerrorplot(PS4deco, x = "Genotype", y = "ChlIdx", color = "Genotype", fill = "Genotype", facet.by = c("treatment", "Date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "Growth Rate (cm / hour)", add.params = list(color = "darkgray")) 
ChlIdx <- ChlIdx + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = T)
ChlIdx <- ChlIdx + rremove("legend")
ChlIdx
## Warning: Computation failed in `stat_compare_means()`
## Computation failed in `stat_compare_means()`
## Computation failed in `stat_compare_means()`
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels

OK - now let’s remove the NA’s and we can keep going:

library(ggsci)
PS5deco  <- na.omit(PS4deco)

ChlIdx <- ggerrorplot(PS5deco, x = "Genotype", y = "ChlIdx", color = "Genotype", fill = "Genotype", facet.by = c("treatment", "Date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "Chlorophyll Index", add.params = list(color = "darkgray")) 
ChlIdx <- ChlIdx + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = F)
ChlIdx <- ChlIdx + rremove("legend") + scale_color_d3("category10") 
ChlIdx

colnames(PS5deco)
##  [1] "tray.ID"   "File"      "Date"      "Time"      "Fv.Fm"     "Fq..Fm."  
##  [7] "NPQ"       "npq.t."    "ChlIdx"    "AriIdx"    "NDVI"      "Round.ID" 
## [13] "treatment" "Genotype"
AriIdx <- ggerrorplot(PS5deco, x = "Genotype", y = "AriIdx", color = "Genotype", fill = "Genotype", facet.by = c("treatment", "Date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "Anthocyanin Index", add.params = list(color = "darkgray")) 
AriIdx <- AriIdx + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = F)
AriIdx <- AriIdx + rremove("legend") + scale_color_d3("category10") 
AriIdx

FvFm <- ggerrorplot(PS5deco, x = "Genotype", y = "Fv.Fm", color = "Genotype", fill = "Genotype", facet.by = c("treatment", "Date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "Fv / Fm", add.params = list(color = "darkgray")) 
FvFm <- FvFm + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = F)
FvFm <- FvFm + rremove("legend") + scale_color_d3("category10") 
FvFm

FqFm <- ggerrorplot(PS5deco, x = "Genotype", y = "Fq..Fm.", color = "Genotype", fill = "Genotype", facet.by = c("treatment", "Date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "Fq / Fm", add.params = list(color = "darkgray")) 
FqFm <- FqFm + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = F)
FqFm <- FqFm + rremove("legend") + scale_color_d3("category10") 
FqFm

NPQ <- ggerrorplot(PS5deco, x = "Genotype", y = "NPQ", color = "Genotype", fill = "Genotype", facet.by = c("treatment", "Date"),
                          desc_stat = "mean_sd", add = "jitter", ncol = 8,
                          xlab="", ylab= "NPQ", add.params = list(color = "darkgray")) 
NPQ <- NPQ + stat_compare_means(aes(label = after_stat(p.signif)), method = "aov", hide.ns = F)
NPQ <- NPQ + rremove("legend") + scale_color_d3("category10") 
NPQ

OK - now let’s now export all of these graphs as PDFs:

library(cowplot)
## 
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggpubr':
## 
##     get_legend
pdf("Initial figures for Carmen.pdf", height = 15, width = 15)
plot_grid(LD, FvFm, FqFm, NULL, AriIdx, ChlIdx, ncols = 3, align = "v", labels = "AUTO")
## Warning in as_grob.default(plot): Cannot convert object of class numeric into a
## grob.
## Warning: Graphs cannot be vertically aligned unless the axis parameter is set.
## Placing graphs unaligned.
dev.off()
## quartz_off_screen 
##                 2