Require usage of anyDuplicated(x) > 0 over any(duplicated(x))
anyDuplicated(x) > 0
any(duplicated(x))
Useful links