Hi, Bill, Thank you for your help. Your R script works very well. Lisa -- View this message in context: http://r.789695.n4.nabble.com/Order-a-matrix-tp3547923p3548017.html Sent from the R help mailing list archive at Nabble.com.