For several documents per case: give the documents a variable that names
the case (e.g. person = "P07" on both interviews of P07), then this
function creates one case per value and assigns the documents as a whole.
The variable is also set on the case, so qda_case_matrix(by = key, unit = "case") works right away.
Value
Invisibly, the touched cases (see qda_cases()).
Examples
qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"),
package = "jellyqda"))
#> # A tibble: 3 × 5
#> id name format chars status
#> <int> <chr> <chr> <int> <chr>
#> 1 1 interview_01.txt txt 856 ok
#> 2 2 interview_02.md md 531 ok
#> 3 3 interview_03.docx docx 459 ok
qda_source_set_var(1, "person", "P1"); qda_source_set_var(2, "person", "P1")
qda_source_set_var(3, "person", "P2")
qda_cases_from_variable("person")
qda_cases()
#> # A tibble: 2 × 7
#> id name description documents passages sources person
#> <int> <chr> <chr> <int> <int> <chr> <chr>
#> 1 1 P1 "" 2 0 interview_01.txt, interview… P1
#> 2 2 P2 "" 1 0 interview_03.docx P2
qda_close()