I have a list of data where there are a's in the second column
- Whenever there is a single a series I want to run routine x with a single argument sending the row number
- Whenever there is a continuous series of a's I want to run routine y with two arguments sending the first and last row numbers
so for the list
I would send
can someone write me a routine to do this?
lets say the numbers are stored in c(1 to 20,1)
and the a's are stored in c(1 to 20,2)