Try apply(b,2,sort) best ozgur -- View this message in context: http://r.789695.n4.nabble.com/Order-all-the-columns-ascending-elements-on-a-matrix-or-a-data-frame-tp4632922p4632924.html Sent from the R help mailing list archive at Nabble.com.