Hi everybody, I am a beginner in R and am not comfortable with functions.
Here is my problem : I have a matrix with 26 samples and 56.000 lines of measures ( on 4/4 in my example)
counts <- data.frame(stringsAsFactors=FALSE,
Sample1 = c(4, 8, 12, 16),
Sample2 = c(12,15,16,12),
Sample3 = c(14,16,7,8),
Sample4 = c(12,13,12,14)
)
13 samples belong to "group E" and 13 other belong to "group M" (2v2 in the example)
I would like to create a function returning me a vector with the p.value of the ttest between group E and group M.
I tried with an apply, but don't find a way for the fonction inside...
Could you help me please to get ou the problem ?
Regards,
Simon