This is in R. I need help taking a dataframe of basic format
NAC cOF3 APir Pu Tu V2.3 mOF3 DGpf
1 6.314770 6.181188 6.
sapply(names(dat), function(x)
sapply( names(dat), function(y) t.test(dat[[x]],dat[[y]])$statistic ))
Can use any of the values returned in the list from the function t.test. Could also have looped across the results of combn(names(dat), 2)
, which would be a choose(n,2)
matrix. (The square matrix has obvious redundant results) Obviously need a sensible adjustment for multiple testing. Could use p.adjust
.