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)
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communitymultiple options are available in R.Apart from your mentioned function.
dplyr
duplicated