I tried to use ave() as well but it didn't work either... ----- Anna Lippel -- View this message in context: http://n4.nabble.com/smart-way-to-turn-a-vector-into-a-matrix-tp1692671p1692685.html Sent from the R help mailing list archive at Nabble.com.