In the following data frame, I want to calculate p-values for each protein comparing the 'control' replicates and the 'treated' replicates. I am very new to using R and I just want to see if I can shift away from using Excel for tasks like these. In reality, I'll have thousands of proteins. I'll then use p.adjust() to correct for the multiple hypothesis testing.
I'd be very grateful for any advice.
Protein Control_1 Control_2 Control_3 Treated_1 Treated_2 Treated_3
1 1 7.15 7.16 7.11 6.91 6.88 6.92
2 2 6.64 6.61 6.59 6.37 6.35 6.41
3 3 3.68 3.78 3.81 2.40 2.09 2.17
4 4 5.04 5.01 4.69 3.43 3.52 3.66
5 5 6.92 6.81 6.90 7.12 7.21 7.27
Desired: -
Protein Control_1 Control_2 Control_3 Treated_1 Treated_2 Treated_3 P-value
1 1 7.15 7.16 7.11 6.91 6.88 6.92 0.000413
2 2 6.64 6.61 6.59 6.37 6.35 6.41 0.000742
3 3 3.68 3.78 3.81 2.40 2.09 2.17 0.001010
4 4 5.04 5.01 4.69 3.43 3.52 3.66 0.001262
5 5 6.92 6.81 6.90 7.12 7.21 7.27 0.004306