Re: [R] Convert two-dimensional array into a three-dimensional array.

2023-12-08 Thread Bert Gunter
OK. I'm not getting what you want, so feel free to ignore this if you think I've missed the point completely and don't want to waste your time. Won't be my first time clueless. A 3-D array can be thought of as as a "pile" of 2-D flats, so a 10 x 2 x 10 array consists of 10 2-d flats, each 10 x

[R] Convert two-dimensional array into a three-dimensional array.

2023-12-08 Thread Sorkin, John
Colleagues I want to convert a 10x2 array: # create a 10x2 matrix. datavals <- matrix(nrow=10,ncol=2) datavals[,] <- rep(c(1,2),10)+c(rnorm(10),rnorm(10)) datavals into a 10x3 array, ThreeDArray, dim(10,2,10). The values storede in ThreeDArray's first dimensions will be the data stored in