I am trying to iteratively carry out a T test on Value 1, row1, column1 in dataframe1 in comparison to Value 1 in dataframe 2.
Simulation dataframe 1 and 2
DF1<-
data.frame(Sample.Name =
c("A1_VAR_A", "A2_VAR_A", "A3_VAR_A", "A4_VAR_A", "A5_VAR_A",
"A6_VAR_A","B1_VAR_A", "B2_VAR_A", "B3_VAR_A", "B4_VAR_A", "B5_VAR_A", "B6_VAR_A"),
Compound1 = runif(12,0,100),
Compound2 = runif(12,0,100),
Compound3 = runif(12,0,100),
Compound4 = runif(12,0,100),
Compound5 = runif(12,0,100),
Compound6 = runif(12,0,100),
Compound7 = runif(12,0,100),
Compound8 = runif(12,0,100),
Compound9 = runif(12,0,100),
Compound10 = runif(12,0,100),
Compound11 = runif(12,0,100),
Compound12 = runif(12,0,100))
DF2 <-
data.frame(Sample.Name =
c("A1_VAR_B", "A2_VAR_B", "A3_VAR_B", "A4_VAR_B", "A5_VAR_B",
"A6_VAR_B","B1_VAR_B", "B2_VAR_B", "B3_VAR_B", "B4_VAR_B",
"B5_VAR_B", "B6_VAR_B"),
Compound1 = runif(12,0,100),
Compound2 = runif(12,0,100),
Compound3 = runif(12,0,100),
Compound4 = runif(12,0,100),
Compound5 = runif(12,0,100),
Compound6 = runif(12,0,100),
Compound7 = runif(12,0,100),
Compound8 = runif(12,0,100),
Compound9 = runif(12,0,100),
Compound10 = runif(12,0,100),
Compound11 = runif(12,0,100),
Compound12 = runif(12,0,100))
So the comparison (Using T test) is between the compound 1 of A1_VarianceA(DF1) and A1_VarianceB(DF2), compound 2 of A1_VarianceB and A1_VarianceB and so on (horizontally) and then the same for compound 1 of A2_VarianceA (DF1) and A2_VarianceB (DF2) and so on for the rest of the dataset(s). Any other test is also welcome to determine the variance, as long as I get pushed in the right direction. Is there also a visualisation plot I could also implement to display the variance in the total data set after the T test?
Thank you in advance for the help and advice !
I've tried to reconcile the dataset and tried the for loop, but the data seemed to be messed up after it with lots of N/A's. Afterwords I also tried a nested for loop, but also couldn't find any promising results.