search for: data_int

Displaying 1 result from an estimated 1 matches for "data_int".

Did you mean: data_in_
2012 Jul 13
1
integrating multi-dimensional dat along one dimension
I just want to integrate a 3D data set along one dimension to obtain a 2D data set. Something like: (given array "d" with dim nx,ny,nz ...) data_int<-array(dim=c(nx,ny)) for (n in 1:ny) { for (m in 1:nx) { data_int[m,n]<-sum(d[m,n,]) } } The thing is, given R's facility with integers, it seems that I should be able to obtain data_int without the explicit for-loops, but I haven't been able to figure out how to do...