pii_scan() works on fields: one row per column of a table, or per block of
running text. Files are turned into fields by pii_read(); use this for
objects already in memory.
Value
A tibble with columns source, locator, name, label, values,
kind (tabular or text) and the column's storage type.
Examples
as_pii_fields(data.frame(q1 = c("a@example.org", "b@example.org")))
#> # A tibble: 1 × 7
#> source locator name label values kind type
#> <chr> <chr> <chr> <chr> <list> <chr> <chr>
#> 1 data q1 q1 NA <chr [2]> tabular character
as_pii_fields("Call Asha on 98765 43210.", source = "note")
#> # A tibble: 1 × 7
#> source locator name label values kind type
#> <chr> <chr> <chr> <chr> <list> <chr> <chr>
#> 1 note text NA NA <chr [1]> text character