Never been to DZone Snippets before?

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. (See related posts)

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


You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts