EFFECTS OF WATER STERSS ON DWARF CHERRY TOMATO

Author

INUSA YAWUZA MUSA (N1349229)

LOADING PACKAGES

library(tidyverse)
library(ggplot2)
library(readxl)
library(dplyr)

LOADING PHENOSPEX DATA

data <- "C://Users//user//Downloads//Weekly_Treatment_Averages.xlsx"

# Import the data from the Excel file
data <- read_excel(data)

# Display the first few rows to confirm import
head(data)
# A tibble: 6 × 13
   Week treatment Cultivar            `Water Stress Level` `Digital biomass mm³`
  <dbl>     <dbl> <chr>               <chr>                                <dbl>
1     1         1 Micro dwarf little… Control                           5948498.
2     1         2 Micro dwarf little… Mild Water Stress                 4674495 
3     1         3 Micro dwarf little… Severe Water Stress               5334812.
4     1         4 Micro dwarf vilma   Control                           4277298.
5     1         5 Micro dwarf vilma   Mild Water Stress                 4827718.
6     1         6 Micro dwarf vilma   Severe Water Stress               3983117.
# ℹ 8 more variables: `greenness average` <dbl>, `Height mm` <dbl>,
#   `Height Max mm` <dbl>, `hue average °` <dbl>, `Leaf angle °` <dbl>,
#   `Leaf area mm²` <dbl>, `NDVI average` <dbl>, `PSRI average` <dbl>

Exploratory Data Analysis

str(data)
tibble [48 × 13] (S3: tbl_df/tbl/data.frame)
 $ Week               : num [1:48] 1 1 1 1 1 1 2 2 2 2 ...
 $ treatment          : num [1:48] 1 2 3 4 5 6 1 2 3 4 ...
 $ Cultivar           : chr [1:48] "Micro dwarf little red riding hood" "Micro dwarf little red riding hood" "Micro dwarf little red riding hood" "Micro dwarf vilma" ...
 $ Water Stress Level : chr [1:48] "Control" "Mild Water Stress" "Severe Water Stress" "Control" ...
 $ Digital biomass mm³: num [1:48] 5948498 4674495 5334812 4277298 4827718 ...
 $ greenness average  : num [1:48] 0.308 0.278 0.296 0.321 0.282 ...
 $ Height mm          : num [1:48] 125 133 157 114 157 ...
 $ Height Max mm      : num [1:48] 140 146 169 132 172 ...
 $ hue average °      : num [1:48] 115 119 117 117 118 ...
 $ Leaf angle °       : num [1:48] 44 44 45.4 42.4 42.9 ...
 $ Leaf area mm²      : num [1:48] 47239 35253 34298 37318 30715 ...
 $ NDVI average       : num [1:48] 0.713 0.696 0.707 0.719 0.691 ...
 $ PSRI average       : num [1:48] 0.0176 0.0116 0.0136 0.0149 0.0133 ...
summary(data)
      Week        treatment     Cultivar         Water Stress Level
 Min.   :1.00   Min.   :1.0   Length:48          Length:48         
 1st Qu.:2.75   1st Qu.:2.0   Class :character   Class :character  
 Median :4.50   Median :3.5   Mode  :character   Mode  :character  
 Mean   :4.50   Mean   :3.5                                        
 3rd Qu.:6.25   3rd Qu.:5.0                                        
 Max.   :8.00   Max.   :6.0                                        
 Digital biomass mm³ greenness average   Height mm     Height Max mm  
 Min.   : 3983117    Min.   :0.2006    Min.   :113.8   Min.   :132.4  
 1st Qu.: 8851375    1st Qu.:0.2612    1st Qu.:166.0   1st Qu.:190.7  
 Median : 9988398    Median :0.2780    Median :179.8   Median :206.2  
 Mean   : 9846058    Mean   :0.2747    Mean   :178.4   Mean   :201.5  
 3rd Qu.:11217047    3rd Qu.:0.2921    3rd Qu.:198.0   3rd Qu.:220.1  
 Max.   :14162383    Max.   :0.3229    Max.   :220.0   Max.   :245.5  
 hue average °    Leaf angle °   Leaf area mm²    NDVI average   
 Min.   :109.1   Min.   :37.99   Min.   :28831   Min.   :0.6563  
 1st Qu.:114.7   1st Qu.:41.04   1st Qu.:50122   1st Qu.:0.7093  
 Median :117.1   Median :42.61   Median :55351   Median :0.7220  
 Mean   :116.5   Mean   :42.88   Mean   :54539   Mean   :0.7188  
 3rd Qu.:118.6   3rd Qu.:44.54   3rd Qu.:61854   3rd Qu.:0.7304  
 Max.   :122.9   Max.   :48.77   Max.   :71531   Max.   :0.7438  
  PSRI average      
 Min.   :-0.002165  
 1st Qu.: 0.007163  
 Median : 0.011192  
 Mean   : 0.012660  
 3rd Qu.: 0.016230  
 Max.   : 0.034163  

Digital Biomass Analysis

# Optional: Label treatments T1–T6
data$treatment_label <- factor(data$treatment,
  levels = 1:6,
  labels = c("T1", "T2", "T3", "T4", "T5", "T6")
)

# Create boxplot (outliers hidden)
ggplot(data, aes(x = treatment_label, y = `Digital biomass mm³`, fill = treatment_label)) +
  geom_boxplot(outlier.shape = NA) +
  labs(
    x = "Treatment",
    y = "Digital Biomass (mm³)",
    fill = "Treatment"
  ) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 13),
    axis.text = element_text(size = 11),
    legend.position = "none"
  )

ANOVA for Digital Biomass

data$treatment <- factor(data$treatment)
model <- aov(`Digital biomass mm³` ~ treatment, data = data)
summary(model)
            Df    Sum Sq   Mean Sq F value Pr(>F)
treatment    5 1.190e+13 2.380e+12   0.341  0.885
Residuals   42 2.935e+14 6.988e+12               

Greenness Average Analysis

# Optional: Ensure treatment labels are set (T1 to T6)
data$treatment_label <- factor(data$treatment,
  levels = 1:6,
  labels = c("T1", "T2", "T3", "T4", "T5", "T6")
)

# Create boxplot without outliers
ggplot(data, aes(x = treatment_label, y = `greenness average`, fill = treatment_label)) +
  geom_boxplot(outlier.shape = NA) +
  labs(
    x = "Treatment",
    y = "Greenness Average",
    fill = "Treatment"
  ) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 13),
    axis.text = element_text(size = 11),
    legend.position = "none"
  )

ANOVA for Greenness Average

data$treatment <- factor(data$treatment)
model_greenness <- aov(`greenness average` ~ treatment, data = data)
summary(model_greenness)
            Df   Sum Sq   Mean Sq F value Pr(>F)  
treatment    5 0.009429 0.0018857   3.418 0.0111 *
Residuals   42 0.023173 0.0005517                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Plant Height Analysis

# Ensure treatment labels are defined as T1 to T6
data$treatment_label <- factor(data$treatment,
  levels = 1:6,
  labels = c("T1", "T2", "T3", "T4", "T5", "T6")
)

# Create the boxplot
ggplot(data, aes(x = treatment_label, y = `Height mm`, fill = treatment_label)) +
  geom_boxplot(outlier.shape = NA) +  # Hide outliers
  labs(
    x = "Treatment",
    y = "Height (mm)",
    fill = "Treatment"
  ) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 13),
    axis.text = element_text(size = 11),
    legend.position = "none"
  )

ANOVA for Plant Height

data$treatment <- factor(data$treatment, levels = 1:6)
model_height <- aov(`Height mm` ~ treatment, data = data)
summary(model_height)
            Df Sum Sq Mean Sq F value Pr(>F)  
treatment    5   6098  1219.7   2.503 0.0452 *
Residuals   42  20467   487.3                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Leaf Area Analysis

# Ensure treatment labels are defined (T1 to T6)
data$treatment_label <- factor(data$treatment,
  levels = 1:6,
  labels = c("T1", "T2", "T3", "T4", "T5", "T6")
)

# Boxplot for Leaf Area with outliers removed
ggplot(data, aes(x = treatment_label, y = `Leaf area mm²`, fill = treatment_label)) +
  geom_boxplot(outlier.shape = NA) +
  labs(
    x = "Treatment",
    y = "Leaf Area (mm²)",
    fill = "Treatment"
  ) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 13),
    axis.text = element_text(size = 11),
    legend.position = "none"
  )

ANOVA for Leaf Area

data$treatment <- factor(data$treatment, levels = 1:6)
model_leaf_area <- aov(`Leaf area mm²` ~ treatment, data = data)
summary(model_leaf_area)
            Df    Sum Sq   Mean Sq F value Pr(>F)
treatment    5 4.143e+08  82852373   0.727  0.607
Residuals   42 4.788e+09 114005904               

NDVI Analysis

# Make sure treatment labels are defined
data$treatment_label <- factor(data$treatment,
  levels = 1:6,
  labels = c("T1", "T2", "T3", "T4", "T5", "T6")
)

# Boxplot for NDVI Average
ggplot(data, aes(x = treatment_label, y = `NDVI average`, fill = treatment_label)) +
  geom_boxplot(outlier.shape = NA) +
  labs(
    x = "Treatment",
    y = "NDVI Average",
    fill = "Treatment"
  ) +
  theme_minimal() +
  theme(
    axis.title = element_text(size = 13),
    axis.text = element_text(size = 11),
    legend.position = "none"
  )

ANOVA for NDVI

model_ndvi <- aov(`NDVI average` ~ treatment, data = data)
summary(model_ndvi)
            Df   Sum Sq   Mean Sq F value Pr(>F)  
treatment    5 0.003149 0.0006299   2.302 0.0617 .
Residuals   42 0.011491 0.0002736                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

LOADING THE YIELD DATA

data2 <- read_excel("C://Users//user//Downloads//2.xlsx")


# Display the first few rows to confirm import
head(data2)
# A tibble: 6 × 5
  DATE                Treatment `Fruit number` `Fruit weight (Kg)`
  <dttm>                  <dbl>          <dbl>               <dbl>
1 2025-05-29 00:00:00         1            111               1.05 
2 2025-05-29 00:00:00         2             77               0.625
3 2025-05-29 00:00:00         3             76               0.55 
4 2025-05-29 00:00:00         4             82               0.77 
5 2025-05-29 00:00:00         5            122               0.905
6 2025-05-29 00:00:00         6             66               0.43 
# ℹ 1 more variable: `Average Brix (°Bx)` <dbl>

Total Fruit Number

ggplot(data2, aes(x = factor(Treatment), y = `Fruit number`, fill = factor(Treatment))) +
  geom_bar(stat = "identity") +
  labs(x = "Treatment", y = "Total Fruit Number", fill = "Treatment") +
  theme_minimal()

aov_fruit <- aov(`Fruit number` ~ factor(Treatment), data = data2)
summary(aov_fruit)
                  Df Sum Sq Mean Sq F value Pr(>F)
factor(Treatment)  5   7665  1532.9   1.591  0.201
Residuals         24  23128   963.7               

Fruit Weight Analysis

ggplot(data2, aes(x = factor(Treatment), y = `Fruit weight (Kg)`, fill = factor(Treatment))) +
  geom_bar(stat = "identity") +
  labs(x = "Treatment", y = "Fruit Weight (Kg)", fill = "Treatment") +
  theme_minimal()

ANOVA for Fruit Weight

aov_weight <- aov(`Fruit weight (Kg)` ~ factor(Treatment), data = data2)
summary(aov_weight)
                  Df Sum Sq Mean Sq F value Pr(>F)  
factor(Treatment)  5 0.7703 0.15405   3.734 0.0121 *
Residuals         24 0.9901 0.04125                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Brix Analysis

ggplot(data2, aes(x = factor(Treatment), y = `Average Brix (°Bx)`, fill = factor(Treatment))) +
  geom_bar(stat = "identity") +
  labs(x = "Treatment", y = "Average Brix (°Bx)", fill = "Treatment") +
  theme_minimal()

ANOVA for BRIX

aov_brix <- aov(`Average Brix (°Bx)` ~ factor(Treatment), data = data2)
summary(aov_brix)
                  Df Sum Sq Mean Sq F value Pr(>F)
factor(Treatment)  5  16.64   3.328    1.29  0.301
Residuals         24  61.90   2.579