Supplementary information

R script for Multivariate analysis - Nitrogen stress condition in Spinach

Packages

library(mixOmics)
library(readxl)
library(textshape)
library(tidyverse)
library(ggpubr)
library(dplyr)
library(MVN)
library(vegan)
library(pairwiseAdonis)

Database “Nitrogen Condition”

database.nitrogen <- read.csv("C:/Users/cesar/Desktop/Tesis Maestria/TRATAMIENTOS/Nitrógeno/Nitrógeno Espinaca Anovas.csv")

database.nitrogen
##    Sample  Condition Valine Alanine   GABA Glutamate Malate Succinate Citrate
## 1       1   Standard  144.7   285.5 1040.9     725.5  869.9     125.4   433.5
## 2       2   Standard   64.1   116.1  432.4     365.2   70.0      23.5    22.9
## 3       3   Standard  104.2   215.8  534.9     686.3  312.5      56.5   243.3
## 4       4   Standard  146.0   244.1 1210.0     691.5  205.5      54.4   232.9
## 5       5   Standard   72.0    91.9  558.0     564.7  278.1      57.3   691.5
## 6       6   Standard   78.7   100.4  763.6     437.3  187.0      46.1   431.7
## 7       7   Standard  127.2   181.2 1117.0     426.1  319.2      56.5   184.5
## 8       8   Standard   65.9   101.4  547.3     465.6  410.8      85.5   377.9
## 9       9   Standard   86.5   149.7  619.8     527.4  248.4      65.9   456.8
## 10     10   Standard   80.9   116.7  632.6     347.9  216.0      46.8   155.0
## 11     11 Deficiency  185.3   438.2 1167.0     759.9   62.1      28.4   601.1
## 12     12 Deficiency  137.1   288.9  516.5     535.2   14.2       8.8    16.5
## 13     13 Deficiency  136.2   168.8  737.4     386.4    0.0      13.9   121.1
## 14     14 Deficiency  103.0   176.6  692.7     252.3    0.0      16.4    38.6
## 15     15 Deficiency   90.3   150.2  583.8     296.7    0.0      17.4    72.2
## 16     16 Deficiency  134.5   311.6  640.4     406.1   26.0      15.0   133.5
## 17     17 Deficiency  136.2   213.6  796.8     370.3    0.0      12.3   118.3
## 18     18 Deficiency  115.1   192.3  544.2     341.6    0.0       7.6    20.8
## 19     19 Deficiency  152.1   243.7  830.4     482.6    0.0      17.5    73.4
## 20     20 Deficiency  108.5   169.3  684.1     163.1   96.4      21.4   128.2
## 21     21     Excess  201.8   325.4  891.1     399.5  124.3      25.7   316.7
## 22     22     Excess  187.1   317.5 1059.4     336.9   67.4      29.7   208.4
## 23     23     Excess  188.4   276.1  965.4     601.0  270.2      52.1   449.9
## 24     24     Excess  174.3   221.7  635.8     323.9  123.9      42.5   498.5
## 25     25     Excess  111.5   183.0  797.0     480.3  302.9      37.8   362.1
## 26     26     Excess  128.2   159.3  790.7     383.0   51.1      26.5    86.1
## 27     27     Excess   84.7   162.9  575.7     159.0   53.6      13.2   143.5
## 28     28     Excess  115.1   235.4  885.4     257.9   72.0      25.9   131.6
## 29     29     Excess  114.2   173.1  715.9     639.0  238.0      42.9   466.7
## 30     30     Excess  124.0   149.6  661.8     268.5   85.1      29.8   155.4
##    Aspartate Betaine Glucose Fructose Sucrose Ascorbate Uridine Adenosine
## 1     1037.3  1853.2   768.8    767.2   902.0     103.5   225.1     163.6
## 2      372.3   506.0   301.3    294.7   187.0      30.1   120.3     107.7
## 3      607.6  1645.5   477.6    556.2   501.1      71.2   136.8     120.0
## 4      552.0  1612.2   683.2    629.7   800.4     191.4   208.3     183.7
## 5      303.5   928.3   376.2    352.5   407.1     234.4   106.1     108.0
## 6      290.4  1330.1   366.7    327.4   266.6     137.4   122.6     146.0
## 7      447.3  1520.3   614.8    542.5   302.4     194.7   144.8     172.4
## 8      255.0  1101.6   365.4    333.6   510.2      51.8   105.0      55.2
## 9      508.0  1420.4   431.5    365.2   282.0     138.1   129.2     129.9
## 10     288.3   936.9   463.2    394.6   385.4      51.9   121.9     104.1
## 11     715.8  4573.2  1521.9   1049.0   345.3     265.4   322.4     337.4
## 12     309.8  1184.3   749.5    541.2    49.2       0.0   193.3     126.7
## 13     273.9  1510.1   413.5    284.6     0.0      47.5   253.8     236.3
## 14     387.1  1114.2   803.1    695.1    43.1       0.0   231.9     207.2
## 15     336.1   898.1  1140.6    889.8    69.8       0.0   199.6     175.9
## 16     473.7  1688.0  1004.2    822.6   327.7      26.6   169.6     146.8
## 17     275.1  1591.7   284.8    121.2     0.0     149.0   231.7     267.8
## 18     268.7  1257.8   472.4    347.7    11.8       0.0   197.5     181.4
## 19     310.1  1493.3   516.1    365.1     0.0      31.7   240.2     190.3
## 20     313.9  1427.7   669.8    559.7   126.5       0.0   203.1     165.4
## 21     480.3  3828.2   680.1    750.6    22.9      77.7   314.7     341.1
## 22     481.4  2002.6   958.1    796.0   177.0     158.5   299.5     295.1
## 23     391.7  2747.7  1296.0   1014.6   126.8     238.2   275.5     392.6
## 24     353.9  2641.7   839.6    685.5    68.4     202.7   208.7     205.8
## 25     352.4  1448.8   760.7    647.6   295.6      97.0   182.6     230.9
## 26     341.6  1005.3   517.4    428.7    53.8       0.0   163.3     140.5
## 27     287.1   802.0   493.7    428.0   493.7       0.0   106.9      89.1
## 28     374.4   565.5  1043.1    842.7   207.3       0.0   211.6     185.6
## 29     408.7  1360.7   669.1    592.6   343.1      51.1   161.0     171.8
## 30     177.7  1441.5   342.4    230.5    32.8     170.3   169.7     196.9
##    Fumarate Tyrosine Phenylalanine Guanosine Formate Choline Ferulate Glycerol
## 1     247.3     79.8          82.5     192.6    51.6   285.9     35.0    494.4
## 2      27.9     32.0          34.0     117.2    33.9   183.0     29.6    209.7
## 3      81.1     70.1          67.6     136.1    65.1   227.5     11.7    353.1
## 4      76.1     78.9          85.0     203.1    32.1   278.1     36.7    386.0
## 5      79.2     34.7          37.8     108.9    24.7   180.6     23.2    215.7
## 6      54.9     40.7          37.2     130.1    26.2   176.4     29.2    234.0
## 7      82.3     61.1          58.0     150.9    51.0   266.4     47.1    375.6
## 8     125.6     31.3          38.3      98.8    29.1   136.9     12.7    211.6
## 9      75.7     42.5          45.1     133.9    37.2   211.8     21.0    319.1
## 10     60.3     39.7          44.0     110.5    24.3   175.2     23.1    224.8
## 11     36.4     90.1          91.8     391.7    37.1   723.1     64.1    507.5
## 12     15.4     65.9          66.2     174.0    48.0   233.3     26.0    211.3
## 13     21.0     59.1          52.8     320.3    24.0   224.2     38.2    256.1
## 14     23.6     47.4          47.8     244.0    26.0   210.5     35.5    268.3
## 15     20.9     42.2          39.2     216.7    22.9   181.2     45.0    206.9
## 16     36.3     73.7          78.6     181.1    47.3   249.4     37.0    307.7
## 17     13.9     45.8          48.2     278.7    41.0   197.5     30.6    256.7
## 18     15.4     41.1          50.6     237.2    50.3   151.9     25.9    237.1
## 19     18.5     56.8          52.4     236.5    32.1   252.5     31.2    304.9
## 20     36.8     57.0          64.6     225.8    22.5   215.7     23.0    302.8
## 21     48.0     90.4          86.1     373.6    73.6   309.9     37.0    469.3
## 22     42.8     92.8          92.6     336.9    26.9   327.7     41.6    447.9
## 23     83.7     71.3         101.7     337.7    45.0   231.7     51.3    409.7
## 24     58.0     75.8          91.9     225.7    28.6   235.0     29.6    304.6
## 25     69.3     61.0          47.3     206.1    38.3   190.4     41.2    265.3
## 26     18.0     56.1          55.1     172.4    21.3   160.4     35.1    206.6
## 27     26.6     43.6          50.4     117.2    20.1   153.3     19.4    189.8
## 28     36.6     54.8          62.4     242.1    32.8   245.8     53.9    295.3
## 29     72.7     63.5          57.2     163.0    19.9   196.4     32.8    282.4
## 30     31.4     60.0          61.0     210.8    29.0   185.1     23.8    263.0
##    Isoleucine Leucine p.Cumarate
## 1        92.3   156.8       17.9
## 2        37.4    72.0       12.3
## 3        70.5   145.3       13.9
## 4        86.5   163.5       24.5
## 5        46.1    75.6       12.2
## 6        48.3    79.9       13.0
## 7        70.0   120.4       15.7
## 8        44.0    75.3        7.7
## 9        48.5    88.5       12.6
## 10       48.5    83.5       11.0
## 11       88.3   164.6       38.1
## 12       72.2   121.5       16.0
## 13       68.1   120.1       19.8
## 14       57.8    99.0       19.0
## 15       49.5    82.7       17.2
## 16       91.1   190.3       23.0
## 17       60.8   108.3       22.6
## 18       57.9    99.9       14.4
## 19       66.8   121.1       19.9
## 20       60.6   112.3       22.5
## 21      110.5   202.4       25.4
## 22      100.4   182.8       36.8
## 23       96.7   158.0       31.8
## 24      100.4   175.8       26.7
## 25       58.5   104.1       23.7
## 26       70.7   120.1       16.0
## 27       46.9    94.9       14.4
## 28       67.1   122.3       30.9
## 29       67.6   121.8       18.8
## 30       71.5   126.2       24.7

Multivariate Normality test “Mardia’s test and Doornik-Hansen’s test”

spinach.data.normality.test <- database.nitrogen[1:30, 3:28]

mardia.result <- mardia(spinach.data.normality.test)
mardia.result
##              Test   Statistic     p.value     Method
## 1 Mardia Skewness 3009.841393 0.999628763 asymptotic
## 2 Mardia Kurtosis   -3.069511 0.002144096 asymptotic
doornik.result <- doornik_hansen(spinach.data.normality.test)
doornik.result
##             Test Statistic df      p.value     Method
## 1 Doornik-Hansen  221.1469 52 9.751091e-23 asymptotic

One -Way PERMANOVA Test

spinach.permanova <- database.nitrogen[1:30, 3:28]

dist_matrix <- vegdist(spinach.permanova, method = "euclidean")

spinach.permanova <- database.nitrogen[1:30, 2:28]

set.seed(42)
res.permanova <- adonis2(dist_matrix ~ Condition,
                         data = spinach.permanova,
                         permutations = 9999,
                         method = "euclidean")
print(res.permanova)
## Permutation test for adonis under reduced model
## Permutation: free
## Number of permutations: 9999
## 
## adonis2(formula = dist_matrix ~ Condition, data = spinach.permanova, permutations = 9999, method = "euclidean")
##          Df SumOfSqs      R2      F Pr(>F)
## Model     2  3888912 0.11286 1.7174 0.1518
## Residual 27 30570212 0.88714              
## Total    29 34459124 1.00000

POST - HOC Pairwise PERMANOVA Test

spinach.permanova <- database.nitrogen[1:30, 3:28]

dist_matrix <- vegdist(spinach.permanova, method = "euclidean")

spinach.permanova <- database.nitrogen[1:30, 2:28]

result_pairwise <- pairwise.adonis(dist_matrix,
                                   factors = spinach.permanova$Condition,
                                   sim.method = "euclidean",
                                   p.adjust.m = "bonferroni",
                                   perm = 9999)
result_pairwise
##                    pairs Df SumsOfSqs   F.Model         R2 p.value p.adjusted
## 1 Standard vs Deficiency  1 2795927.2 2.7146837 0.13105118  0.0242     0.0726
## 2     Standard vs Excess  1 2661048.0 2.8328229 0.13597883  0.0652     0.1956
## 3   Deficiency vs Excess  1  376392.1 0.2636907 0.01443797  0.7457     1.0000
##   sig
## 1    
## 2    
## 3

Multivariate Data For sPCA and sPLS-DA

database <- read.csv("C:/Users/cesar/Desktop/Tesis Maestria/TRATAMIENTOS/Nitrógeno/Matriz Datos Espinaca Nitrógeno.csv")

database <- textshape::column_to_rownames(database, loc = 1)

spinach <- as.data.frame(database)

spinach <- subset(spinach, select= -c(Class))

X <- spinach

Y <- database$Class

dim(X)
## [1] 30 26

“Sparse Principal Component Analysis” sPCA

explainedVariance <- tune.pca(X, ncomp = 10, center = TRUE, scale = TRUE)

plot(explainedVariance)

test.keepX <- c(seq(26))

tune.spca.res <- tune.spca(X, ncomp = 3,
                           nrepeat = 5,
                           folds = 10,
                           test.keepX = test.keepX)

plot(tune.spca.res)

spca <- spca(X, ncomp = 3,
             scale = TRUE,
             center = TRUE)

plotIndiv(spca, comp = c(1, 2), ind.names = TRUE,
          group = database$Class,
          ellipse = TRUE,
          cutoff = 0.5,
          size.title = 15,
          size.legend = 15,
          size.xlabel = 15,
          size.ylabel = 15,
          col = c("red", "green", "blue"),
          legend = TRUE, title = 'Nitrogen stress in Spinach')

plotVar(spca, comp = c(1, 2), var.names = TRUE,
        cutoff = 0,
        rad.in = 1,
        title = 'Nitrogen stress in spinach')

biplot(spca, cex = 1,
       group = database$Class,
       pch.size = 5,
       cutoff = 0.5,
       size.legend = 20,
       size.xlabel = 20,
       size.ylabel = 20,
       col = c("red", "green", "blue"),
       title = 'Nitrogen stress in Spinach')

plotLoadings(spca, comp = 1,
             size.title = 1,
             size.name = 1,
             size.axis = 1,
             ncomp = 26)

plotLoadings(spca, comp = 2,
             size.title = 1,
             size.name = 1,
             size.axis = 1,
             ncomp = 26)

“Sparse Partial Least Squares-Discriminant Analysis” sPLS-DA

splsda <- splsda(X, Y, ncomp = 10, scale = TRUE)

set.seed(30)

plotIndiv(splsda, comp = c(1, 2), ind.names = TRUE,
          group = database$Class,
          ellipse = TRUE,
          cutoff = 0.5,
          size.title = 15,
          size.legend = 15,
          size.xlabel = 15,
          size.ylabel = 15,
          col = c("red", "green", "blue"),
          legend = TRUE, title = 'Nitrogen stress in Spinach')

perf.splsda <- perf(splsda, validation = "Mfold", 
                    folds = 5, nrepeat = 50,
                    progressBar = FALSE, auc = TRUE)

plot(perf.splsda, sd = TRUE, legend.position = "vertical")

perf.splsda$choice.ncomp
##         max.dist centroids.dist mahalanobis.dist
## overall        2              2                2
## BER            2              2                2
tune.splsda <- tune.splsda(X, Y, ncomp = 3, 
                           validation = 'Mfold',
                           folds = 5, nrepeat = 50, 
                           dist = 'max.dist',
                           test.keepX = c (5, 10, 15, 20, 26),
                           measure = "BER")
plot(tune.splsda)

final.splsda <- splsda(X, Y, ncomp = 2, keepX = c(16, 26) , scale = TRUE)

plotIndiv(final.splsda, comp = c(1, 2), ind.names = TRUE,
          group = database$Class,
          ellipse = TRUE,
          cutoff = 0.5,
          size.title = 15,
          size.legend = 15,
          size.xlabel = 15,
          size.ylabel = 15,
          col = c("red", "green", "blue"),
          legend = TRUE, title = 'Nitrogen stress in Spinach')

plotVar(final.splsda, comp = c(1, 2), var.names = TRUE,
        cutoff = 0,
        rad.in = 1,
        title = 'Nitrogen stress in spinach')

biplot(final.splsda, cex = 1,
       group = database$Class,
       pch.size = 5,
       cutoff = 0,
       size.legend = 20,
       size.xlabel = 20,
       size.ylabel = 20,
       col = c("red", "green", "blue"),
       title = 'Nitrogen stress in Spinach')

plotLoadings(final.splsda, comp = 1,
             size.title = 1,
             size.name = 1)

plotLoadings(final.splsda, comp = 2,
             size.title = 1,
             size.name = 1)

sPLS-DA model evaluation

perf.res <- perf.assess(final.splsda, dist = "max.dist",
                        validation = "Mfold", 
                        folds = 5, 
                        nrepeat = 50)

perf.res$error.rate$overall[,'max.dist']
## [1] 0.324
perf.res$error.rate.class$max.dist
## Deficiency     Excess   Standard 
##      0.210      0.654      0.108
summary(Y)
##    Length  N.unique   N.blank Min.nchar Max.nchar 
##        30         3         0         6        10
perf.res$error.rate$BER[,'max.dist']
## [1] 0.324
auc.plsda <- auroc(final.splsda, roc.comp = 2, print = FALSE)

Analysis of Variance ANOVA for metabolites detected

ANOVATest.data <- read.csv("C:/Users/cesar/Desktop/Tesis Maestria/TRATAMIENTOS/Nitrógeno/Nitrógeno Espinaca Anovas.csv")

attach(ANOVATest.data)

str(ANOVATest.data)
## 'data.frame':    30 obs. of  28 variables:
##  $ Sample       : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ Condition    : chr  "Standard" "Standard" "Standard" "Standard" ...
##  $ Valine       : num  144.7 64.1 104.2 146 72 ...
##  $ Alanine      : num  285.5 116.1 215.8 244.1 91.9 ...
##  $ GABA         : num  1041 432 535 1210 558 ...
##  $ Glutamate    : num  726 365 686 692 565 ...
##  $ Malate       : num  870 70 312 206 278 ...
##  $ Succinate    : num  125.4 23.5 56.5 54.4 57.3 ...
##  $ Citrate      : num  433.5 22.9 243.3 232.9 691.5 ...
##  $ Aspartate    : num  1037 372 608 552 304 ...
##  $ Betaine      : num  1853 506 1646 1612 928 ...
##  $ Glucose      : num  769 301 478 683 376 ...
##  $ Fructose     : num  767 295 556 630 352 ...
##  $ Sucrose      : num  902 187 501 800 407 ...
##  $ Ascorbate    : num  103.5 30.1 71.2 191.4 234.4 ...
##  $ Uridine      : num  225 120 137 208 106 ...
##  $ Adenosine    : num  164 108 120 184 108 ...
##  $ Fumarate     : num  247.3 27.9 81.1 76.1 79.2 ...
##  $ Tyrosine     : num  79.8 32 70.1 78.9 34.7 40.7 61.1 31.3 42.5 39.7 ...
##  $ Phenylalanine: num  82.5 34 67.6 85 37.8 37.2 58 38.3 45.1 44 ...
##  $ Guanosine    : num  193 117 136 203 109 ...
##  $ Formate      : num  51.6 33.9 65.1 32.1 24.7 26.2 51 29.1 37.2 24.3 ...
##  $ Choline      : num  286 183 228 278 181 ...
##  $ Ferulate     : num  35 29.6 11.7 36.7 23.2 29.2 47.1 12.7 21 23.1 ...
##  $ Glycerol     : num  494 210 353 386 216 ...
##  $ Isoleucine   : num  92.3 37.4 70.5 86.5 46.1 48.3 70 44 48.5 48.5 ...
##  $ Leucine      : num  156.8 72 145.3 163.5 75.6 ...
##  $ p.Cumarate   : num  17.9 12.3 13.9 24.5 12.2 13 15.7 7.7 12.6 11 ...

Alanine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Alanine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Alanine[Condition == "Standard"]
## W = 0.88112, p-value = 0.1344
with(ANOVATest.data, shapiro.test(Alanine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Alanine[Condition == "Deficiency"]
## W = 0.85022, p-value = 0.05844
with(ANOVATest.data, shapiro.test(Alanine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Alanine[Condition == "Excess"]
## W = 0.87997, p-value = 0.1304
Hm_var <- bartlett.test(Alanine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Alanine by Condition
## Bartlett's K-squared = 0.97398, df = 2, p-value = 0.6145
#### ONE WAY - ANOVA

OneWay_test <- aov(Alanine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Condition    2  31560   15780   2.783 0.0796 .
## Residuals   27 153107    5671                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Alanine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr       upr     p adj
## Excess-Deficiency   -14.92  -98.41895 68.578948 0.8978647
## Standard-Deficiency -75.04 -158.53895  8.458948 0.0843857
## Standard-Excess     -60.12 -143.61895 23.378948 0.1935532
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Alanine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Valine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Valine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Valine[Condition == "Standard"]
## W = 0.86053, p-value = 0.07741
with(ANOVATest.data, shapiro.test(Valine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Valine[Condition == "Deficiency"]
## W = 0.94439, p-value = 0.6028
with(ANOVATest.data, shapiro.test(Valine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Valine[Condition == "Excess"]
## W = 0.88871, p-value = 0.164
Hm_var <- bartlett.test(Valine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Valine by Condition
## Bartlett's K-squared = 1.4655, df = 2, p-value = 0.4806
#### ONE WAY - ANOVA

OneWay_test <- aov(Valine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Condition    2  11186    5593   4.915 0.0151 *
## Residuals   27  30724    1138                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Valine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff       lwr       upr     p adj
## Excess-Deficiency    13.10 -24.30451 50.504507 0.6644547
## Standard-Deficiency -32.81 -70.21451  4.594507 0.0938819
## Standard-Excess     -45.91 -83.31451 -8.505493 0.0138504
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Valine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Leucine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Leucine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Leucine[Condition == "Standard"]
## W = 0.81318, p-value = 0.02096
with(ANOVATest.data, shapiro.test(Leucine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Leucine[Condition == "Deficiency"]
## W = 0.86501, p-value = 0.08739
with(ANOVATest.data, shapiro.test(Leucine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Leucine[Condition == "Excess"]
## W = 0.91243, p-value = 0.2981
Hm_var <- bartlett.test(Leucine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Leucine by Condition
## Bartlett's K-squared = 0.17905, df = 2, p-value = 0.9144
#### ONE WAY - ANOVA

OneWay_test <- aov(Leucine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2   6056    3028   2.451  0.105
## Residuals   27  33361    1236
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Leucine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff       lwr       upr     p adj
## Excess-Deficiency    18.86 -20.11646 57.836465 0.4635417
## Standard-Deficiency -15.90 -54.87646 23.076465 0.5761586
## Standard-Excess     -34.76 -73.73646  4.216465 0.0873245
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Leucine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Isoleucine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Isoleucine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Isoleucine[Condition == "Standard"]
## W = 0.86039, p-value = 0.07711
with(ANOVATest.data, shapiro.test(Isoleucine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Isoleucine[Condition == "Deficiency"]
## W = 0.90013, p-value = 0.2198
with(ANOVATest.data, shapiro.test(Isoleucine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Isoleucine[Condition == "Excess"]
## W = 0.91497, p-value = 0.3169
Hm_var <- bartlett.test(Isoleucine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Isoleucine by Condition
## Bartlett's K-squared = 1.837, df = 2, p-value = 0.3991
#### ONE WAY - ANOVA

OneWay_test <- aov(Isoleucine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Condition    2   1986   993.0   2.981 0.0677 .
## Residuals   27   8995   333.1                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Isoleucine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr        upr     p adj
## Excess-Deficiency    11.72  -8.518353 31.9583528 0.3372622
## Standard-Deficiency  -8.10 -28.338353 12.1383528 0.5879147
## Standard-Excess     -19.82 -40.058353  0.4183528 0.0557882
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Isoleucine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

GABA

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(GABA[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  GABA[Condition == "Standard"]
## W = 0.86152, p-value = 0.07952
with(ANOVATest.data, shapiro.test(GABA[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  GABA[Condition == "Deficiency"]
## W = 0.86917, p-value = 0.09776
with(ANOVATest.data, shapiro.test(GABA[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  GABA[Condition == "Excess"]
## W = 0.97353, p-value = 0.9215
Hm_var <- bartlett.test(GABA ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  GABA by Condition
## Bartlett's K-squared = 3.1036, df = 2, p-value = 0.2119
#### ONE WAY - ANOVA

OneWay_test <- aov(GABA ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df  Sum Sq Mean Sq F value Pr(>F)
## Condition    2   31917   15959   0.354  0.705
## Residuals   27 1217894   45107
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = GABA ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff       lwr      upr     p adj
## Excess-Deficiency    78.49 -157.0082 313.9882 0.6901838
## Standard-Deficiency  26.32 -209.1782 261.8182 0.9586184
## Standard-Excess     -52.17 -287.6682 183.3282 0.8477196
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = GABA, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Betaine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Betaine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Betaine[Condition == "Standard"]
## W = 0.95821, p-value = 0.7653
with(ANOVATest.data, shapiro.test(Betaine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Betaine[Condition == "Deficiency"]
## W = 0.593, p-value = 4.564e-05
with(ANOVATest.data, shapiro.test(Betaine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Betaine[Condition == "Excess"]
## W = 0.92507, p-value = 0.4012
Hm_var <- bartlett.test(Betaine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Betaine by Condition
## Bartlett's K-squared = 7.3267, df = 2, p-value = 0.02565
#### ONE WAY - ANOVA

OneWay_test <- aov(Betaine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df   Sum Sq Mean Sq F value Pr(>F)
## Condition    2  1373405  686702   0.894  0.421
## Residuals   27 20740615  768171
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Betaine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                        diff        lwr       upr     p adj
## Excess-Deficiency    110.56  -861.2774 1082.3974 0.9571587
## Standard-Deficiency -388.39 -1360.2274  583.4474 0.5888084
## Standard-Excess     -498.95 -1470.7874  472.8874 0.4222173
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Betaine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Phenylalanine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Phenylalanine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Phenylalanine[Condition == "Standard"]
## W = 0.84304, p-value = 0.04798
with(ANOVATest.data, shapiro.test(Phenylalanine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Phenylalanine[Condition == "Deficiency"]
## W = 0.90457, p-value = 0.2457
with(ANOVATest.data, shapiro.test(Phenylalanine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Phenylalanine[Condition == "Excess"]
## W = 0.8712, p-value = 0.1032
Hm_var <- bartlett.test(Phenylalanine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Phenylalanine by Condition
## Bartlett's K-squared = 0.47373, df = 2, p-value = 0.7891
#### ONE WAY - ANOVA

OneWay_test <- aov(Phenylalanine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2   1595   797.7   2.306  0.119
## Residuals   27   9338   345.9
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Phenylalanine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr       upr     p adj
## Excess-Deficiency    11.35  -9.271268 31.971268 0.3730900
## Standard-Deficiency  -6.27 -26.891268 14.351268 0.7339056
## Standard-Excess     -17.62 -38.241268  3.001268 0.1048655
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Phenylalanine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Tyrosine

#### PNORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Tyrosine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Tyrosine[Condition == "Standard"]
## W = 0.84429, p-value = 0.04966
with(ANOVATest.data, shapiro.test(Tyrosine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Tyrosine[Condition == "Deficiency"]
## W = 0.91435, p-value = 0.3122
with(ANOVATest.data, shapiro.test(Tyrosine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Tyrosine[Condition == "Excess"]
## W = 0.93799, p-value = 0.5309
Hm_var <- bartlett.test(Tyrosine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Tyrosine by Condition
## Bartlett's K-squared = 0.58795, df = 2, p-value = 0.7453
#### ONE WAY - ANOVA

OneWay_test <- aov(Tyrosine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2   1264   632.1     2.2   0.13
## Residuals   27   7756   287.3
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Tyrosine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr       upr     p adj
## Excess-Deficiency     9.02  -9.773589 27.813589 0.4691684
## Standard-Deficiency  -6.83 -25.623589 11.963589 0.6442828
## Standard-Excess     -15.85 -34.643589  2.943589 0.1106061
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Tyrosine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Aspartate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Aspartate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Aspartate[Condition == "Standard"]
## W = 0.81738, p-value = 0.02356
with(ANOVATest.data, shapiro.test(Aspartate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Aspartate[Condition == "Deficiency"]
## W = 0.71691, p-value = 0.001413
with(ANOVATest.data, shapiro.test(Aspartate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Aspartate[Condition == "Excess"]
## W = 0.92927, p-value = 0.4407
Hm_var <- bartlett.test(Aspartate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Aspartate by Condition
## Bartlett's K-squared = 7.7606, df = 2, p-value = 0.02064
#### ONE WAY - ANOVA

OneWay_test <- aov(Aspartate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2  67346   33673   1.228  0.309
## Residuals   27 740103   27411
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Aspartate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr      upr     p adj
## Excess-Deficiency    -1.50 -185.08154 182.0815 0.9997738
## Standard-Deficiency  99.75  -83.83154 283.3315 0.3822026
## Standard-Excess     101.25  -82.33154 284.8315 0.3716485
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Aspartate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Glutamate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Glutamate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glutamate[Condition == "Standard"]
## W = 0.91289, p-value = 0.3014
with(ANOVATest.data, shapiro.test(Glutamate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glutamate[Condition == "Deficiency"]
## W = 0.94504, p-value = 0.6103
with(ANOVATest.data, shapiro.test(Glutamate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glutamate[Condition == "Excess"]
## W = 0.95424, p-value = 0.7188
Hm_var <- bartlett.test(Glutamate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Glutamate by Condition
## Bartlett's K-squared = 0.27217, df = 2, p-value = 0.8728
#### ONE WAY - ANOVA

OneWay_test <- aov(Glutamate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2 116494   58247   2.502  0.101
## Residuals   27 628475   23277
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Glutamate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr      upr     p adj
## Excess-Deficiency   -14.52 -183.69128 154.6513 0.9753658
## Standard-Deficiency 124.33  -44.84128 293.5013 0.1815047
## Standard-Excess     138.85  -30.32128 308.0213 0.1231242
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Glutamate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Adenosine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Adenosine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Adenosine[Condition == "Standard"]
## W = 0.95656, p-value = 0.746
with(ANOVATest.data, shapiro.test(Adenosine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Adenosine[Condition == "Deficiency"]
## W = 0.92283, p-value = 0.3812
with(ANOVATest.data, shapiro.test(Adenosine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Adenosine[Condition == "Excess"]
## W = 0.95581, p-value = 0.7373
Hm_var <- bartlett.test(Adenosine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Adenosine by Condition
## Bartlett's K-squared = 6.095, df = 2, p-value = 0.04748
#### ONE WAY - ANOVA

OneWay_test <- aov(Adenosine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Condition    2  50654   25327   5.418 0.0105 *
## Residuals   27 126215    4675                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Adenosine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr        upr     p adj
## Excess-Deficiency    21.42  -54.39199  97.231989 0.7652117
## Standard-Deficiency -74.46 -150.27199   1.351989 0.0549600
## Standard-Excess     -95.88 -171.69199 -20.068011 0.0110885
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Adenosine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Guanosine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Guanosine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Guanosine[Condition == "Standard"]
## W = 0.87891, p-value = 0.1268
with(ANOVATest.data, shapiro.test(Guanosine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Guanosine[Condition == "Deficiency"]
## W = 0.90233, p-value = 0.2323
with(ANOVATest.data, shapiro.test(Guanosine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Guanosine[Condition == "Excess"]
## W = 0.92873, p-value = 0.4355
Hm_var <- bartlett.test(Guanosine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Guanosine by Condition
## Bartlett's K-squared = 5.9648, df = 2, p-value = 0.05067
#### ONE WAY - ANOVA

OneWay_test <- aov(Guanosine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)   
## Condition    2  76149   38075   9.015  0.001 **
## Residuals   27 114033    4223                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Guanosine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                        diff        lwr       upr     p adj
## Excess-Deficiency    -12.05  -84.11076  60.01076 0.9099133
## Standard-Deficiency -112.39 -184.45076 -40.32924 0.0017627
## Standard-Excess     -100.34 -172.40076 -28.27924 0.0050790
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Guanosine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Uridine

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Uridine[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Uridine[Condition == "Standard"]
## W = 0.78339, p-value = 0.009104
with(ANOVATest.data, shapiro.test(Uridine[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Uridine[Condition == "Deficiency"]
## W = 0.89469, p-value = 0.1914
with(ANOVATest.data, shapiro.test(Uridine[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Uridine[Condition == "Excess"]
## W = 0.93107, p-value = 0.4585
Hm_var <- bartlett.test(Uridine ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Uridine by Condition
## Bartlett's K-squared = 2.7072, df = 2, p-value = 0.2583
#### ONE WAY - ANOVA

OneWay_test <- aov(Uridine ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Condition    2  38439   19220   7.123 0.00328 **
## Residuals   27  72848    2698                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Uridine ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr        upr     p adj
## Excess-Deficiency   -14.96  -72.55595  42.635948 0.7972892
## Standard-Deficiency -82.30 -139.89595 -24.704052 0.0040441
## Standard-Excess     -67.34 -124.93595  -9.744052 0.0194785
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Uridine, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Glucose

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Glucose[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glucose[Condition == "Standard"]
## W = 0.9035, p-value = 0.2392
with(ANOVATest.data, shapiro.test(Glucose[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glucose[Condition == "Deficiency"]
## W = 0.94536, p-value = 0.6141
with(ANOVATest.data, shapiro.test(Glucose[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glucose[Condition == "Excess"]
## W = 0.97905, p-value = 0.9599
Hm_var <- bartlett.test(Glucose ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Glucose by Condition
## Bartlett's K-squared = 6.1203, df = 2, p-value = 0.04688
#### ONE WAY - ANOVA

OneWay_test <- aov(Glucose ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df  Sum Sq Mean Sq F value Pr(>F)  
## Condition    2  500299  250149    3.03  0.065 .
## Residuals   27 2228883   82551                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Glucose ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                        diff       lwr       upr     p adj
## Excess-Deficiency      2.43 -316.1558 321.01579 0.9998028
## Standard-Deficiency -272.72 -591.3058  45.86579 0.1040702
## Standard-Excess     -275.15 -593.7358  43.43579 0.1002909
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Glucose, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Fructose

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Fructose[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Fructose[Condition == "Standard"]
## W = 0.872, p-value = 0.1055
with(ANOVATest.data, shapiro.test(Fructose[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Fructose[Condition == "Deficiency"]
## W = 0.97244, p-value = 0.9125
with(ANOVATest.data, shapiro.test(Fructose[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Fructose[Condition == "Excess"]
## W = 0.98099, p-value = 0.9702
Hm_var <- bartlett.test(Fructose ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Fructose by Condition
## Bartlett's K-squared = 3.1705, df = 2, p-value = 0.2049
#### ONE WAY - ANOVA

OneWay_test <- aov(Fructose ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df  Sum Sq Mean Sq F value Pr(>F)
## Condition    2  174019   87009   1.576  0.225
## Residuals   27 1490735   55212
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Fructose ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                        diff       lwr      upr     p adj
## Excess-Deficiency     74.08 -186.4652 334.6252 0.7626480
## Standard-Deficiency -111.24 -371.7852 149.3052 0.5473372
## Standard-Excess     -185.32 -445.8652  75.2252 0.2008757
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Fructose, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Sucrose

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Sucrose[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Sucrose[Condition == "Standard"]
## W = 0.88543, p-value = 0.1506
with(ANOVATest.data, shapiro.test(Sucrose[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Sucrose[Condition == "Deficiency"]
## W = 0.73724, p-value = 0.002495
with(ANOVATest.data, shapiro.test(Sucrose[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Sucrose[Condition == "Excess"]
## W = 0.90621, p-value = 0.2559
Hm_var <- bartlett.test(Sucrose ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Sucrose by Condition
## Bartlett's K-squared = 3.0967, df = 2, p-value = 0.2126
#### ONE WAY - ANOVA

OneWay_test <- aov(Sucrose ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Condition    2 696112  348056   10.86 0.000347 ***
## Residuals   27 865753   32065                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Sucrose ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr      upr     p adj
## Excess-Deficiency    84.80 -113.75453 283.3545 0.5471324
## Standard-Deficiency 357.08  158.52547 555.6345 0.0003721
## Standard-Excess     272.28   73.72547 470.8345 0.0057900
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Sucrose, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Citrate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Citrate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Citrate[Condition == "Standard"]
## W = 0.96315, p-value = 0.8211
with(ANOVATest.data, shapiro.test(Citrate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Citrate[Condition == "Deficiency"]
## W = 0.60952, p-value = 7.184e-05
with(ANOVATest.data, shapiro.test(Citrate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Citrate[Condition == "Excess"]
## W = 0.8954, p-value = 0.1949
Hm_var <- bartlett.test(Citrate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Citrate by Condition
## Bartlett's K-squared = 0.3842, df = 2, p-value = 0.8252
#### ONE WAY - ANOVA

OneWay_test <- aov(Citrate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Condition    2 201287  100643   3.343 0.0505 .
## Residuals   27 812907   30108                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Citrate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff         lwr      upr     p adj
## Excess-Deficiency   149.52  -42.879233 341.9192 0.1505558
## Standard-Deficiency 190.63   -1.769233 383.0292 0.0525055
## Standard-Excess      41.11 -151.289233 233.5092 0.8574757
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Citrate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Malate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Malate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Malate[Condition == "Standard"]
## W = 0.77158, p-value = 0.006538
with(ANOVATest.data, shapiro.test(Malate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Malate[Condition == "Deficiency"]
## W = 0.68437, p-value = 0.0005698
with(ANOVATest.data, shapiro.test(Malate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Malate[Condition == "Excess"]
## W = 0.82744, p-value = 0.03117
Hm_var <- bartlett.test(Malate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Malate by Condition
## Bartlett's K-squared = 22.87, df = 2, p-value = 1.081e-05
#### ONE WAY - ANOVA

OneWay_test <- aov(Malate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Condition    2 430784  215392   11.34 0.000266 ***
## Residuals   27 512947   18998                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Malate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff       lwr      upr     p adj
## Excess-Deficiency   118.98 -33.85373 271.8137 0.1496332
## Standard-Deficiency 291.87 139.03627 444.7037 0.0001785
## Standard-Excess     172.89  20.05627 325.7237 0.0242248
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Malate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Succinate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Succinate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Succinate[Condition == "Standard"]
## W = 0.86011, p-value = 0.07653
with(ANOVATest.data, shapiro.test(Succinate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Succinate[Condition == "Deficiency"]
## W = 0.95106, p-value = 0.6811
with(ANOVATest.data, shapiro.test(Succinate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Succinate[Condition == "Excess"]
## W = 0.95623, p-value = 0.7422
Hm_var <- bartlett.test(Succinate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Succinate by Condition
## Bartlett's K-squared = 17.895, df = 2, p-value = 0.0001301
#### ONE WAY - ANOVA

OneWay_test <- aov(Succinate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Condition    2  10801    5401   17.88 1.13e-05 ***
## Residuals   27   8155     302                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Succinate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                      diff       lwr    upr     p adj
## Excess-Deficiency   16.74 -2.531005 36.011 0.0978756
## Standard-Deficiency 45.92 26.648995 65.191 0.0000079
## Standard-Excess     29.18  9.908995 48.451 0.0023581
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Succinate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Fumarate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Fumarate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Fumarate[Condition == "Standard"]
## W = 0.73297, p-value = 0.002214
with(ANOVATest.data, shapiro.test(Fumarate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Fumarate[Condition == "Deficiency"]
## W = 0.82455, p-value = 0.02876
with(ANOVATest.data, shapiro.test(Fumarate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Fumarate[Condition == "Excess"]
## W = 0.96426, p-value = 0.8332
Hm_var <- bartlett.test(Fumarate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Fumarate by Condition
## Bartlett's K-squared = 25.088, df = 2, p-value = 3.567e-06
#### ONE WAY - ANOVA

OneWay_test <- aov(Fumarate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Condition    2  23100   11550   8.291 0.00156 **
## Residuals   27  37614    1393                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Fumarate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                      diff         lwr       upr     p adj
## Excess-Deficiency   24.89 -16.4966394  66.27664 0.3108934
## Standard-Deficiency 67.22  25.8333606 108.60664 0.0011622
## Standard-Excess     42.33   0.9433606  83.71664 0.0442431
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Fumarate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Formate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Formate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Formate[Condition == "Standard"]
## W = 0.86734, p-value = 0.09308
with(ANOVATest.data, shapiro.test(Formate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Formate[Condition == "Deficiency"]
## W = 0.88121, p-value = 0.1347
with(ANOVATest.data, shapiro.test(Formate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Formate[Condition == "Excess"]
## W = 0.79587, p-value = 0.01292
Hm_var <- bartlett.test(Formate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Formate by Condition
## Bartlett's K-squared = 1.2051, df = 2, p-value = 0.5474
#### ONE WAY - ANOVA

OneWay_test <- aov(Formate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2     80   39.98   0.208  0.814
## Residuals   27   5194  192.37
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Formate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                      diff       lwr      upr     p adj
## Excess-Deficiency   -1.57 -16.94923 13.80923 0.9653444
## Standard-Deficiency  2.40 -12.97923 17.77923 0.9210316
## Standard-Excess      3.97 -11.40923 19.34923 0.7994905
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Formate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

p.Cumarate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(p.Cumarate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  p.Cumarate[Condition == "Standard"]
## W = 0.8903, p-value = 0.1709
with(ANOVATest.data, shapiro.test(p.Cumarate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  p.Cumarate[Condition == "Deficiency"]
## W = 0.78396, p-value = 0.009252
with(ANOVATest.data, shapiro.test(p.Cumarate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  p.Cumarate[Condition == "Excess"]
## W = 0.96888, p-value = 0.8803
Hm_var <- bartlett.test(p.Cumarate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  p.Cumarate by Condition
## Bartlett's K-squared = 1.7843, df = 2, p-value = 0.4098
#### ONE WAY - ANOVA

OneWay_test <- aov(p.Cumarate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Condition    2  607.9  303.97   7.944 0.00194 **
## Residuals   27 1033.2   38.27                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = p.Cumarate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr       upr     p adj
## Excess-Deficiency     3.67  -3.189148 10.529148 0.3930918
## Standard-Deficiency  -7.17 -14.029148 -0.310852 0.0391455
## Standard-Excess     -10.84 -17.699148 -3.980852 0.0015428
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = p.Cumarate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Ferulate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Ferulate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Ferulate[Condition == "Standard"]
## W = 0.96458, p-value = 0.8365
with(ANOVATest.data, shapiro.test(Ferulate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Ferulate[Condition == "Deficiency"]
## W = 0.86086, p-value = 0.07811
with(ANOVATest.data, shapiro.test(Ferulate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Ferulate[Condition == "Excess"]
## W = 0.97283, p-value = 0.9158
Hm_var <- bartlett.test(Ferulate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Ferulate by Condition
## Bartlett's K-squared = 0.096786, df = 2, p-value = 0.9528
#### ONE WAY - ANOVA

OneWay_test <- aov(Ferulate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2    566   283.0   2.206   0.13
## Residuals   27   3464   128.3
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Ferulate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                      diff       lwr       upr     p adj
## Excess-Deficiency    0.92 -11.63881 13.478807 0.9819896
## Standard-Deficiency -8.72 -21.27881  3.838807 0.2156730
## Standard-Excess     -9.64 -22.19881  2.918807 0.1571636
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Ferulate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Glycerol

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Glycerol[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glycerol[Condition == "Standard"]
## W = 0.86273, p-value = 0.08218
with(ANOVATest.data, shapiro.test(Glycerol[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glycerol[Condition == "Deficiency"]
## W = 0.76101, p-value = 0.00486
with(ANOVATest.data, shapiro.test(Glycerol[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Glycerol[Condition == "Excess"]
## W = 0.90413, p-value = 0.2431
Hm_var <- bartlett.test(Glycerol ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Glycerol by Condition
## Bartlett's K-squared = 0.18336, df = 2, p-value = 0.9124
#### ONE WAY - ANOVA

OneWay_test <- aov(Glycerol ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2   3820    1910   0.217  0.807
## Residuals   27 238154    8821
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Glycerol ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff        lwr       upr     p adj
## Excess-Deficiency    27.46  -76.67859 131.59859 0.7918302
## Standard-Deficiency  16.47  -87.66859 120.60859 0.9189882
## Standard-Excess     -10.99 -115.12859  93.14859 0.9630129
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Glycerol, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Ascorbate

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Ascorbate[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Ascorbate[Condition == "Standard"]
## W = 0.93411, p-value = 0.4895
with(ANOVATest.data, shapiro.test(Ascorbate[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Ascorbate[Condition == "Deficiency"]
## W = 0.67348, p-value = 0.000421
with(ANOVATest.data, shapiro.test(Ascorbate[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Ascorbate[Condition == "Excess"]
## W = 0.90849, p-value = 0.2708
Hm_var <- bartlett.test(Ascorbate ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Ascorbate by Condition
## Bartlett's K-squared = 0.56718, df = 2, p-value = 0.7531
#### ONE WAY - ANOVA

OneWay_test <- aov(Ascorbate ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2  24595   12298   1.796  0.185
## Residuals   27 184871    6847
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Ascorbate ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                      diff       lwr      upr     p adj
## Excess-Deficiency   47.53 -44.22228 139.2823 0.4159178
## Standard-Deficiency 68.43 -23.32228 160.1823 0.1730930
## Standard-Excess     20.90 -70.85228 112.6523 0.8397915
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Ascorbate, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()

Choline

#### NORMALITY's TEST AND HOMOGENEITY OF VARIANCE

with(ANOVATest.data, shapiro.test(Choline[Condition == "Standard"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Choline[Condition == "Standard"]
## W = 0.91623, p-value = 0.3266
with(ANOVATest.data, shapiro.test(Choline[Condition == "Deficiency"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Choline[Condition == "Deficiency"]
## W = 0.55025, p-value = 1.42e-05
with(ANOVATest.data, shapiro.test(Choline[Condition == "Excess"]))
## 
##  Shapiro-Wilk normality test
## 
## data:  Choline[Condition == "Excess"]
## W = 0.91594, p-value = 0.3244
Hm_var <- bartlett.test(Choline ~ Condition, data =ANOVATest.data)
Hm_var
## 
##  Bartlett test of homogeneity of variances
## 
## data:  Choline by Condition
## Bartlett's K-squared = 14.682, df = 2, p-value = 0.0006485
#### ONE WAY - ANOVA

OneWay_test <- aov(Choline ~ Condition, data =ANOVATest.data)
summary(OneWay_test)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Condition    2  14789    7395   0.672  0.519
## Residuals   27 297036   11001
#### POST-HOC TUKEY's Test

TukeyHSD(OneWay_test)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Choline ~ Condition, data = ANOVATest.data)
## 
## $Condition
##                       diff       lwr       upr     p adj
## Excess-Deficiency   -40.36 -156.6621  75.94209 0.6693299
## Standard-Deficiency -51.75 -168.0521  64.55209 0.5203512
## Standard-Excess     -11.39 -127.6921 104.91209 0.9680573
#### BOXPLOT

ggplot(ANOVATest.data, aes(x = Condition, y = Choline, fill = Condition)) +
  geom_boxplot() +
  geom_jitter (shape = 15,
               color = "steelblue",
               position = position_jitter(0.21)) +
  theme_classic()