| row_disclosure | R Documentation |
Compares the modelled columns only (identifiers are equal by design).
row_disclosure(orig, syn, spec, rows = seq_len(nrow(orig)), min_share = 0.9)
orig, syn |
Raw character data.frames in the same layout. |
spec |
The shared spec. |
rows |
Rows to compare (default: all). |
min_share |
Report also rows matching at least this share of cells. |
list(identical = share of rows fully identical, identical_unique =
share of rows identical AND unique in the original (the disclosive kind),
near = share of
rows matching at least min_share of their cells, per_row = vector).
df <- data.frame(id = sprintf("AB%03d", 1:60), value = 1:60,
code = rep(c(0, 1, NA), 20))
path <- file.path(tempdir(), "row_disclosure.csv")
utils::write.csv(df, path, row.names = FALSE, na = "")
src <- read_source(path)
spec <- infer_spec(src)
syn <- src$raw
syn$value[1:30] <- rev(syn$value[1:30])
row_disclosure(src$raw, syn, spec, min_share = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.