Looking for second opinion on checking that attribute in data frame is unique using r Check whether attribute name in city is unique (i.e. each city has a different name).  data_frame is city with a column called name.

length(unique(city$name))
rapply(city,function(name)length(unique(name)))
unique(city$name)
multiple options are available in R.Apart from your mentioned function.

dplyr

duplicated