Skip to contents

Counts the words of all documents, one document, or only of the passages coded with a code (incl. its subcodes) – an entry point for inductive work. Words are lower-cased; numbers, time stamps and stop words are left out.

Usage

qda_words(source = NULL, code = NULL, n = 50, min_chars = 3, stopwords = TRUE)

Arguments

source

Optional source id or name.

code

Optional code id or label: only words inside its codings (and those of its subcodes).

n

Number of words to return (most frequent first); Inf for all.

min_chars

Minimum word length.

stopwords

TRUE (built-in German and English lists), FALSE, or a character vector of further words to leave out (added to the built-in list).

Value

A tibble: word, n (occurrences), sources (in how many documents).

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_code_add("Career path")
qda_code_add("SME", parent = "Career path")
qda_code(1, "SME", segment = 2)
qda_words(n = 10)
#> # A tibble: 10 × 3
#>    word            n sources
#>    <chr>       <int>   <int>
#>  1 interviewer     3       1
#>  2 respondent      3       1
#>  3 years           3       1
#>  4 company         2       1
#>  5 project         2       1
#>  6 small           2       1
#>  7 agile           1       1
#>  8 anonymous       1       1
#>  9 briefly         1       1
#> 10 business        1       1
qda_words(code = "Career path")   # only within these codings
#> # A tibble: 8 × 3
#>   word            n sources
#>   <chr>       <int>   <int>
#> 1 briefly         1       1
#> 2 good            1       1
#> 3 interviewer     1       1
#> 4 introduce       1       1
#> 5 morning         1       1
#> 6 taking          1       1
#> 7 thank           1       1
#> 8 time            1       1
qda_close()