Hi, What is the best way of writing of matrices of different rows in a file? Should the matrices with the same number of rows be written first and then, empty columns for the matrices with a smaller number of rows followed by the matrices with a larger number of rows? Not a good solution (see below). Can't they be written with 1 script? m = rbind(c(1,2),c(2,44)) n = rbind(c(1,3),c(2,4),c(5,8)) write.csv(cbind(m,n),...) Error in .Method(..., deparse.level = deparse.level) :   number of rows of matrices must match (see arg 2) write.csv(cbind(m,n[1.2,]),...)  write.csv(cbind(cbind(rep(" ",1), rep(" ",1)),n[3,]),...) Warning message: In write.csv(cbind(cbind(rep(" ", 1), rep(" ", 1)), n[3,  :   attempt to set 'append' ignored Thanks Carol [[alternative HTML version deleted]]