Hi All, I have a non-square matrix of 0s/1s. The rows are individuals, and the colums factors. The code is 1 if a factor is present, 0 if not. I would like to rearrange the order of the rows to find if there are any diagonal blocks. Is there a fucntion that would do that already in R? Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com