# NOT RUN {
a <- array(1:8, c(2, 2, 2))
# iterate over all the matrices
it <- iapply(a, 3)
as.list(it)
# iterate over all the columns of all the matrices
it <- iapply(a, c(2, 3))
as.list(it)
# iterate over all the rows of all the matrices
it <- iapply(a, c(1, 3))
as.list(it)
# }
Run the code above in your browser using DataLab