Skip to contents

For group interviews and focus groups: every speaker label found at the start of a segment ("B1: ...", "[00:03:10] Anna: ...") becomes a case that contains all turns of this speaker. Segment the document by speaker turns first (qda_segments_set() with "speaker", or import with segments = "speaker"). Interviewer labels are left out. The case variable document records where the speaker comes from.

Usage

qda_cases_from_speakers(
  source,
  exclude = c("I", "Int", "Interviewer", "Interviewerin", "Moderation", "Mod", "M"),
  prefix = TRUE
)

Arguments

source

Document (id or name) – or several.

exclude

Speaker labels that are not cases (interviewer, moderator).

prefix

If TRUE (default) the case name starts with the document name ("group_1 - B1"), so that B1 of two groups are different cases. With FALSE the label alone is the name – then the same person can collect turns from several documents.

Value

Invisibly, the touched cases (see qda_cases()).

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
f <- file.path(tempdir(), "group.txt")
writeLines(c("I: How do you organise the shifts?", "B1: We plan them together.",
             "B2: Mostly the manager does it.", "B1: But we can swap."), f)
qda_import(f, segments = "speaker")
#> # A tibble: 1 × 5
#>      id name      format chars status
#>   <int> <chr>     <chr>  <int> <chr> 
#> 1     1 group.txt txt      114 ok    
qda_cases_from_speakers(1)
qda_cases()
#> # A tibble: 2 × 7
#>      id name       description documents passages sources   document 
#>   <int> <chr>      <chr>           <int>    <int> <chr>     <chr>    
#> 1     1 group - B1 ""                  1        2 group.txt group.txt
#> 2     2 group - B2 ""                  1        1 group.txt group.txt
qda_close()