Dear all, When I coerce a vector into a multi dimensional array, I would like R to start filling the array along the last dimension, then the 2nd last etc. Let's jump straight into an example.
x <- 1 : 24 y <- array(dim=c(2,2,6)) I would like to have: y[1,1,1] = 1 y[1,1,2] = 2 ... y[1,1,6] = 6 y[1,2,1] = 7 y[1,2,2] = 8 ... y[2,1,1] = 13 ... y[2,2,1] = 19 if I do y<- array(x, dim=c(2,2,6)), i think I will get y[1,1,1] = 1 y[2,1,1] = 2 (or something not I want) instead. Of course, I need a fast solution, as I am actually dealing with array of much larger size. Any input will be appreciated Thanks a lot ______________________________________________ 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.