DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Create A Multidimensional Matrix.
Brian Ripley said:
> my.array<-array(0,dim=c(10,5,6,8))
will give you a 4-dimensional 10 x 5 x 6 x 8 array. Or
> array.test <- array(1:64,c(4,4,4)) > array.test[1,1,1] > 1 > array.test[4,4,4] > 64





