Ok so as I am using a data.frame I just need to use split() without the sapply now it worked :) thanks! ----- Anna Lippel -- View this message in context: http://n4.nabble.com/smart-way-to-turn-a-vector-into-a-matrix-tp1692671p1692759.html Sent from the R help mailing list archive at Nabble.com.