Skip to content
Prev 110000 / 398500 Next

Sorting rows of a binary matrix

On Thu, 22 Feb 2007, Serguei Kaniovski wrote:

            
The alternative:

    mat <- as.matrix(expand.grid(rep(list(0:1), x))[ , x:1 ]  )
Charles C. Berry                        (858) 534-2098
                                          Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	         UC San Diego
http://biostat.ucsd.edu/~cberry/         La Jolla, San Diego 92093-0901