Skip to content
Prev 314557 / 398502 Next

splitting matrices

Alternatively you could use

dim(dd) <- c(31, 36, 12)

That will give you an array in which each small matrix is defined as

dd[,1:36,]

You can work with that directly, or if you want the separate matrices to be
represented by the third index:

ddd <- aperm(dd, c(1, 3, 2))

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352