Skip to contents

Reads the files like qda_import() would and counts how often each name of the key list would be replaced – nothing is imported. Use it to check the key list: a name with 0 hits is perhaps spelled differently in the transcript.

Usage

qda_pseudonymise_preview(files, pseudonyms)

Arguments

files

Paths of .txt, .md, .docx or .pdf files.

pseudonyms

Key list, see qda_pseudonyms().

Value

A tibble: file, original, replacement, n (replacements).

Examples

f <- file.path(tempdir(), "interview_anna.txt")
writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f)
qda_pseudonymise_preview(f, c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]"))
#> # A tibble: 3 × 4
#>   file               original replacement     n
#>   <chr>              <chr>    <chr>       <int>
#> 1 interview_anna.txt Hamburg  [City 1]        1
#> 2 interview_anna.txt Anna     [Person A]      2
#> 3 interview_anna.txt Ben      [Person B]      1