Skip to content

iterate over vector with "range vector" inside

2 messages · Christian Schulz, jim holtman

#
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
#
use 'list' instead of 'c'



Sent from my iPad
On May 22, 2012, at 5:23, chschulz at email.de wrote: