Skip to content
Prev 132595 / 398506 Next

alternate storage options

You can use a loop...

If x,y and z are your vectors containing Nx,Ny and Nz
numbers respectively, then
for (Ix in 1:Nx) for (Iy in 1:Ny) for (Iz in 1:Nz) {
Point <- c(x[Ix],y[Iy],z[Iz])
do whatever you need with Point
}

A (probably better) compromise may be:

a <- matrix(0,nrow = Ny*Nz, ncol = 3)
for (i in 1:Nx) {
a[,2:3] <- expand.grid(y,z)
a[,1] <- x[i]
do whatever you want with a
}
--- dxc13 <dxc13 at health.state.ny.us> wrote:

            
http://www.nabble.com/alternate-storage-options-tp14438736p14438736.html