This expression:
a<-7<b:b
means to assign 7 to a if 7<b==TRUE otherwise b. How can this be done in R?
Building on the Paul Hiemstra, how to make it more succint? Dummy var or?
M<-matrix(rep(0,30),
ncol=3,
dimnames=list(NULL,c('q1','a1','s1')))
dummy1<-round(rexp(n=1,rate=server1))
M[loopVar,'s1']<-ifelse(M[loopVar,'q1']<dummy1,M[loopVar,'q1'],dummy1)
Something like this should work:
and it is even vectorized.