Hi I have a matrix a = 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 b = 5 6 7 8 9 10 I want output as c = 5 2 3 8 2 3 1 6 3 1 9 3 1 2 7 1 2 10 Please any on help to avoid reduncy of my code ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Help-in-matrix-tp4449622p4449622.html Sent from the R help mailing list archive at Nabble.com.