On Sat, Aug 22, 2009 at 2:45 PM, Michael Kogan <michael.ko...@gmx.net> wrote:
>> >> 1. Sort the rows after the row sums (greater sums first). >> 2. Sort the columns after the first column (columns with ones in the first >> row go left, columns with zeros go right). >> 3. Save the left part (all columns with ones in the first row) and the right >> part in separate matrices. >> 4. Repeat steps 2 and 3 with both of the created matrices (now taking the >> second row for sorting), repeat until all fragments consist of a single >> column. >> 5. Compose the columns to a sorted matrix. > If you want to go about this by implementing the algo you described, I think > you'd be best suited via some divide-and-conquer/recursion route: Starting from step 2, that is. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.