Displaying 1 result from an estimated 1 matches for "vectsim".
Did you mean:
certsim
2004 Nov 22
0
IFELSE across a 3D array?
...10
0/1 1 0/1
We think that an APPLY on a multi dimensional array is the way to go, with
each realization (2 dimensions) being a dimension of the array (like a
stack of maps)
This is where we have got so far:
*********************
library(abind)
#Sim: 0=Absent; 1=Present; 10=NODATA
vectSim <-
c(0,1,0,1,10,0,1,0,1,1,10,0,1,1,0,1,0,10,10,1,0,1,0,1,0,1,1,10,0,10,10,1,0,1,0,10)
#Mask: 1=DATA; 10=NODATA
vectMask <- c(10,1,10,1,1,10,1,10,1,10,10,1)
length(vectSim)
length(vectMask)
numRow<-3
numCol<-4
numReal<-3
Sim <- array(vectSim, c(numRow,numCol,numReal))
Sim
Mask &...