search for: whichrunnow

Displaying 2 results from an estimated 2 matches for "whichrunnow".

2017 Jun 23
2
Simple control structure issue
I am having a hard time with 'next'. I come from the "sloppy" school that learned BASIC with Goto. Conceptually next seems pretty straightforward. I just can't get it to work correctly in my code. Here's a stripped down version: WhichRunNow<-"Daily" Cnums=c(0,1,"2b3") Cpers=c("Daily","Daily","Weekly") for (j in (1:length(Cnums))) { If (!identical(Cpers[j],WhichRunNow)){ next } print(j) } So, this should print the number "3", which it does....
2017 Jun 23
0
Simple control structure issue
...; wrote: > I am having a hard time with 'next'. I come from the "sloppy" school that > learned BASIC with Goto. > > Conceptually next seems pretty straightforward. I just can't get it to > work correctly in my code. Here's a stripped down version: > > WhichRunNow<-"Daily" > Cnums=c(0,1,"2b3") > Cpers=c("Daily","Daily","Weekly") > > for (j in (1:length(Cnums))) { > If (!identical(Cpers[j],WhichRunNow)){ > next > } > print(j) > } > > So, this...