### array with no indices
x <- array(1, dim = c(1, 3, 2))
index(x)
### indices on initialization
x <- array(1, dim = c(i=1, j=3, k=2))
index(x)
### set indices on the fly
x <- array(1, dim = c(1, 3, 2))
index(x) <- c("i", "j", "k")
index(x)
Run the code above in your browser using DataLab