Displaying 1 result from an estimated 1 matches for "ts8".
Did you mean:
s8
2008 Jul 28
2
Help with a loop
...-0
dt<-0
for (m in 1:14)
{
tmax[m]<-duration[m]
dtmin<-969
dtmax<-9884
i<-1
dt[m]<-round(runif(1,dtmin,(tmax[m]-1)))}
ts<-c(1)
ts1<-ts
ts2<-ts1
ts3<-ts1
ts4<-ts1
ts5<-ts1
ts6<-ts1
ts7<-ts1
ts8<-ts1
ts9<-ts1
ts10<-ts1
ts11<-ts1
ts12<-ts1
ts13<-ts1
ts14<-ts1
for (m in 1:2){
while(i+dt[m]<tmax[m])
{
ts1<-append(ts,i+dt[1])
i<-i+dt[1]
ifelse(dtmin<=(tmax[1]-i), dt[1]<-round(runif(1,dtm...