Reads a survey export (CSV or Excel) and suggests a role for every
column: the respondent id, columns with open answers ("text"),
columns to keep as document variables (few distinct values, e.g. age
group or field of study) and columns to ignore (time stamps, IP
addresses, ...). Pass the suggestions – or your own choice – to
qda_import_survey().
Value
A tibble, one row per column: column, role, answers
(non-empty cells), distinct, mean_chars, example. Attribute
"rows": number of respondents.
Examples
f <- system.file("extdata", "survey_demo.csv", package = "jellyqda")
qda_survey_columns(f)
#> # A tibble: 9 × 6
#> column role answers distinct mean_chars example
#> <chr> <chr> <int> <int> <dbl> <chr>
#> 1 respondent id 12 12 7 "DEMO_…
#> 2 submitted igno… 12 12 16 "2027-…
#> 3 age_group vari… 12 3 4.5 "18-21"
#> 4 field_of_study vari… 12 3 13.1 "Envir…
#> 5 semester vari… 12 7 1 "1"
#> 6 Why did you choose your field of st… text 11 6 62.7 "I wan…
#> 7 What causes you stress during your … text 11 8 68.6 "Deadl…
#> 8 What would help you most? text 9 6 40.8 "Finan…
#> 9 Satisfaction with your studies (1-5) vari… 12 5 1 "2"