Description Usage Arguments Value Examples
View source: R/duplicate_checks.R
Among other things, uses assertr::is_uniq.
1 | chk_duplicate(.data, .variables)
|
.data |
Data to audit. |
.variables |
Column variables to check. |
Adds attribute that contains the audit errors, if any, to the data.
Use aud_report()
to view the audit fails.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(magrittr)
# dataset with one duplicate value between id and time
ds <- data.frame(
id = c(rep(1:3, each = 2), 3),
time = c(rep(1:2, times = 3), 1)
)
ds
flaws <- chk_duplicate(ds, c("id", "time"))
aud_report(flaws) # Should be one
flaws <- chk_duplicate(ds, c("id"))
aud_report(flaws) # Should be all of them
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.