[R] iterate over vector with "range vector" inside

chschulz at email.de chschulz at email.de
Tue May 22 11:23:38 CEST 2012


   Hello,
   Have anybody a hint,  how I could iterate over the vector below.
   So I'll wish only 8 iterations. Put the "range vector" in c() didn't help.
   for(i in c(1,2,3,4,5,11:20,21:50,51:100)) {
   sum(dfc[i,"cnt"]) # or similar actions
   }
   Thanks in advance
   Christian


More information about the R-help mailing list