Compare length of text responses for different groups of participants. Data is split based on different values in the `field` column of formatted data. Results will be shown within the plots pane.
Usage
fst_length_compare(
data,
field,
incl_sentences = TRUE,
exclude_nulls = FALSE,
rename_nulls = "null_data"
)
Arguments
- data
A dataframe of text in CoNLL-U format with additional `field` column for splitting data.
- field
Column in `data` used for splitting groups
- incl_sentences
Whether to include sentence data in table, default is `TRUE`.
- exclude_nulls
Whether to include NULLs in `field` column, default is `FALSE`
- rename_nulls
What to fill NULL values with if `exclude_nulls = FALSE`.
Examples
fst_length_compare(fst_child, 'gender')
#> Description Respondents Mean Minimum Q1 Median Q3 Maximum
#> <char> <int> <num> <int> <num> <num> <num> <int>
#> 1: boy- Words 212 4.802 1 2 3 6 31
#> 2: boy- Sentences 212 1.156 1 1 1 1 4
#> 3: girl- Words 201 5.896 1 3 4 8 37
#> 4: girl- Sentences 201 1.284 1 1 1 1 6
fst_length_compare(fst_dev_coop, 'education_level', incl_sentences = FALSE)
#> Description Respondents Mean Minimum
#> <char> <int> <num> <int>
#> 1: Matriculation examination- Words 440 5.809 1
#> 2: Primary education- Words 44 4.000 1
#> 3: Upper secondary vocational qualification- Words 86 5.023 3
#> 4: null_data- Words 350 5.457 1
#> Q1 Median Q3 Maximum
#> <num> <num> <num> <int>
#> 1: 4 5 6 32
#> 2: 3 4 4 18
#> 3: 4 4 6 14
#> 4: 4 5 6 20