want to remove 2 consecutive lines in r : [Data base Picture][1]


  [1]: https://i.stack.imgur.com/52NrJ.png



Hi,
attached is the link of transaction.
this is a scenario of cancelled transaction in a restaurant check.
I want R to check if an item has flag "U", then remove the U and 1 similar item which is not u. 
I have marked the items to be removed in Yellow.

Much appreciate the support.

NS
