Hi, You could try: mat1 <- matrix(1:(272*12),ncol=12,byrow=TRUE) mat2 <- t(mat1) dim(mat2) <- c(272*12,1)
#or mat3 <- matrix(as.vector(mat2),ncol=1) identical(mat2,mat3) #[1] TRUE A.K. Hello, I am pretty new to R and would like to transform my 272x12 matrix into a 3264X1. I'm trying to have the setup change from: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 13,14,15,16,17,18,19,20,21,22, 23, 24 etc. to 1 2 3 4 5 6 7 8 9 10 11 12 etc. Any suggestions? Thanks in advance ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.