Oki, (I think) I understand.
In that case you might find the function which() useful, such as in this example:
data <- c(1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 5, 10, 100, 140)
asdf <- which(data == 1)[-1] # index of items in data equal to 1 (except the first)
data[-asdf] # return all items on data except those on index asdf
In this case it will find all the indexes of your vector where the item is equal to 1 (except for the first one - that is handled by the minus one in square brackets). Then it is just a matter of removing all the items on the index.
You will want to iterate this process - perhaps using a for cycle or what not.