You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The get_dupes() function returns a data.frame with the duplicated names.
The new is_dupes() would return a TRUE/FALSE when there's another name/value duplicated on the dataset.
data.frame(
x = c("Brazil", "US", "Brazil", "China", "UK"),
is_dupes = c(TRUE, FALSE, TRUE, FALSE, FALSE)
)
#> x is_dupes
#> 1 Brazil TRUE
#> 2 US FALSE
#> 3 Brazil TRUE
#> 4 China FALSE
#> 5 UK FALSE
mtcars %>%
dplyr::add_count(mpg, name = "is_dupe") %>%
dplyr::mutate(as.logical(is_dupe-1))
A janitor function would likely just be wrapping that. Given that it's just two lines in dplyr, and the limited capacity for developing janitor, I'm going to close this as unplanned. And I apologize for taking so long to acknowledge this suggestion! 😔
Feature requests
The
get_dupes()
function returns a data.frame with the duplicated names.The new
is_dupes()
would return a TRUE/FALSE when there's another name/value duplicated on the dataset.Created on 2022-06-29 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: