Skip to content
Prev 367872 / 398500 Next

find and

Thank you Rudi and  Ulrik.

Rudi, your option worked for the small data set but when I applied to
the big data set it taking long and never finished and have to kill
it. I dont know why.


Ulrik's option worked fine for the big data set  (> 1.5M  records)
and took less than 2 minutes.

These two are giving me the same  results.
# Counting unique
DF4 %>%    group_by(city) %>%     filter(length(unique(var)) == 1)
# Counting not duplicated
DF4 %>%    group_by(city) %>%    filter(sum(!duplicated(var)) == 1)

 Thank yo again.
On Sat, Mar 18, 2017 at 10:40 AM, Ulrik Stervbo <ulrik.stervbo at gmail.com> wrote: