Dear Berend, the coding is not working for more than 6. Try to plug 10 or other number. Would you please correct ? -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-a-vector-to-an-upper-matrix-tp3587715p4633628.html Sent from the R help mailing list archive at Nabble.com.