0
$\begingroup$

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)
$\endgroup$

1 Answer 1

1
$\begingroup$

multiple options are available in R.Apart from your mentioned function.

dplyr

duplicated

$\endgroup$
1
  • $\begingroup$ Ok, so when someone on this site is looking for the same answer they can go to this question. $\endgroup$
    – Chris Kehl
    Dec 6, 2018 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.