My data has repeats in columns for two variables BFP and DAP. There are 10 rows of these - with each row named after a gene. I am trying to compare the means of AFP and APP for each gene via a two-sample t-test with unequal variances, and assign the name to each output p-value. The current code stores 10 of the same t-test output.
pvalue <- vector(mode = "list", nrow(dataframe))
for (i in seq(nrow(dataframe))){
  pvalue[[i]]<-t.test(df.BFP, df.DAP)
}
How do I get it to iterate through doing a t-test for each row, and then assign that to the row name? The dataframse looks like this:
                 BFP      BFP     BFP    DAP     DAP      DAP  
CTFP synthase  -0.4787 -0.3728 -0.7448 -1.3823 -0.9742 -0.8923
cathepsin       1.8874  1.5847  2.1324  2.3847  2.1883  1.9283
pusine          0.9348  0.8573  0.7376  0.9273  1.0283  1.0283
DPSH synthase  -0.9123 -0.8172  2.1234 -0.2736 -0.9273 -0.3726
This is a summary of a lot more columns (38) and rows.
