Skip to contents

Every occurrence of a word or phrase with the text to its left and right – to see how a term is used across all interviews.

Usage

qda_kwic(
  pattern,
  source = NULL,
  width = 50,
  ignore_case = TRUE,
  whole_word = TRUE
)

Arguments

pattern

Word or phrase (plain text).

source

Optional source id or name.

width

Characters of context on each side.

ignore_case

Logical.

whole_word

Logical; only whole words.

Value

A tibble: source_id, source, segment, start, end, left, match, right.

Examples

qda_open(file.path(tempfile(), "example.jellyqda"))
qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda"))
#> # A tibble: 1 × 5
#>      id name             format chars status
#>   <int> <chr>            <chr>  <int> <chr> 
#> 1     1 interview_01.txt txt      856 ok    
qda_kwic("colleague", width = 30)
#> # A tibble: 1 × 8
#>   source_id source           segment start   end left                match right
#>       <int> <chr>              <int> <int> <int> <chr>               <chr> <chr>
#> 1         1 interview_01.txt       5   554   562 "n really make a d… coll… " fr…
qda_kwic("inform", whole_word = FALSE)   # also inside words ("informatics")
#> # A tibble: 1 × 8
#>   source_id source           segment start   end left                match right
#>       <int> <chr>              <int> <int> <int> <chr>               <chr> <chr>
#> 1         1 interview_01.txt       5   409   414 "to this job? Resp… info… atic…
qda_close()