R: Remove subsequent rows after specific occurences of character by group I have a large dataset similar to the following one.