On Thu, 21 Apr 2005, Ernesto Jardim wrote:
I'm using colSums and rowSums to sum the first dimensions of arrays. It works
ok but the resulting object is different. See
a3d - array(rnorm(120, mean=2), dim=c(20,6,1))
dim(colSums(a3d))
[1] 6 1
dim(rowSums(a3d))
NULL
class(colSums(a3d))
[1] matrix
Prof Brian Ripley wrote:
On Thu, 21 Apr 2005, Ernesto Jardim wrote:
I'm using colSums and rowSums to sum the first dimensions of arrays.
It works ok but the resulting object is different. See
a3d - array(rnorm(120, mean=2), dim=c(20,6,1))
dim(colSums(a3d))
[1] 6 1
dim(rowSums(a3d))
NULL