Skip to content

setting pairwise comparisons of columns

3 messages · Louis Plough, Tal Galili, Peter Dalgaard

#
On Apr 13, 2011, at 21:32 , Louis Plough wrote:

            
Well, for i==3, your inner loop is for (j in 4:3), and R is not C, so 
this runs backwards from 4. The quick fix is (I think k is superfluous)
 
for (i in 1:2)
   for (j in (i+1):3)	

However, also check pairwise.table() for a generic solution 
(including adjustment for multiple testing)