I have a data set where the samples are grouped by row. This is because I'm working with different replicates. Here is an example of my data format, where the Sample 1 is in the first row with his 3 replicates values (-5.11, -6.64, -2.44)
R1 R2 R3
-5.11 -6.64 -2.44
-4.77 -6.64 2.49
-6.64 -4.01 3.07
-6.64 0.66 -3.65
-3.06 2.7 -6.64
3.26 3.23 1.64
2.34 3.28 3.25
3.14 0.79 3.18
2.98 3.12 -6.64
-6.64 -1.85 -3.86
What I would like to do is an ANOVA analysis row by row using the 3 replicates and have a new column with the p-value. This is how it would look like:
R1 R2 R3 p-value
-5.11 -6.64 -2.44 0.91 (1º anova)
-4.77 -6.64 2.49 0.006 (2º anova)
-6.64 -4.01 3.07 0.05 (3º anova)
-6.64 0.66 -3.65 0.0001
-3.06 2.7 -6.64 0.0006
3.26 3.23 1.64 0.60
2.34 3.28 3.25 ...
3.14 0.79 3.18 ...
2.98 3.12 -6.64 ...
-6.64 -1.85 -3.86 ...
I tried to do this with Excel, but the problem with this is that Excel creates a summary table, not just the result. For few results this's OK, I copy the p-value and copy in the fourth column, but in this case I have 13000 rows...
Here you are a reproducible example:
R1 = c(-5.11,-4.77,-6.64,-6.64,-3.06,3.26,2.34)
R2 = c(-6.64,-6.64,-4.01,0.66,2.7,3.23,3.28)
R3 = c(-2.44,2.49,3.07,-3.65,-6.64,1.64,3.25)
mydata = data.frame(cbind(R1,R2,R3))
I tried to use R in order to do this analysis, but I didn't find the way to do it row by row. The only option I found was by column.
Thank you in advance.