The scanner proposes; a person decides. pii_review() writes one row per
flagged field to a CSV file with two empty columns, decision and
reason. Fill in allow for a field that may stay, with the reason, and
remove for one that must go. pii_accept() then records the allowed
fields in the project's .piinata.yml, where pii_check() finds them, so a
decision is made once and kept with the data.
Usage
pii_review(findings, file = "piinata-review.csv")
pii_accept(file = "piinata-review.csv", config = ".piinata.yml")Arguments
- findings
The result of
pii_scan().- file
The review file to write or read.
- config
The project configuration file to update.
Value
pii_review() returns file, invisibly. pii_accept() returns the
updated configuration, invisibly.
Examples
dir <- tempfile()
dir.create(dir)
review <- file.path(dir, "review.csv")
config <- file.path(dir, ".piinata.yml")
findings <- pii_scan(data.frame(village = paste("Village", 1:30)))
pii_review(findings, review)
#> Wrote 1 field to review to /tmp/RtmpeoiXV6/file1d7942068a84/review.csv.
#> ℹ Set decision to "allow" or "remove", give a reason, then run `pii_accept()`.
decisions <- read.csv(review)
decisions$decision <- "allow"
decisions$reason <- "Needed for clustering."
write.csv(decisions, review, row.names = FALSE)
pii_accept(review, config)
#> Recorded 1 allowed field in /tmp/RtmpeoiXV6/file1d7942068a84/.piinata.yml.
pii_check(findings, config = pii_config(config))