I see you specifically tagged base-r
here, but a recent thread provided some tidyverse
options for looking at duplicate rows: Return the unique records and the last duplicated row
Also this tweet thread has some base R tips: https://twitter.com/WeAreRLadies/status/1093541404985352192