Remove all instances of duplicates in R

I came a cross a data set that included two unique identification fields.  The first was for the data set and was truly unique.  The second was a cross reference to a separate data set and unfortunately wasn’t unique.  I wrote some R code to remove any duplicated instances of the non-unique identifiers.

The data set was loaded in from a .csv into a R data frame, mydata.  “File Number” is the column name where the duplicated values reside.

Code box by: Crayon Syntax Highlighter