Description Usage Arguments Value Examples
Use find_question to search for information on a given question in a study and get_questions to return all the question in a study.
1 2 3 | find_questions(study, question_name, all_columns = FALSE)
get_questions(study, all_columns = FALSE)
|
study |
a character specifying the name of the desired study.
Find with |
question_name |
A vector of strings specifying the variable names. A search is performed for similar names from all variables in the study. Upper or lower case is ignored and regular expressions are supported. |
all_columns |
|
a tibble
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Not run:
# Set login information here. See ?sqp_login
sqp_login()
# 1 is the study ESS round 1
find_questions("ESS round 1", "tvtot")
# If that doesn't fit, then use get_questions and search for the question
# manually through filtering:
all_questions <- get_questions("ESS round 1")
cnt_filt <- all_questions$country_iso == "ES"
lang_filt <- all_questions$language_iso == "spa"
var_filt <- grepl("TvTot", all_questions$short_name)
# The desired "TvTot" variable from Spain, in Spanish
all_questions[cnt_filt & lang_filt & var_filt, ]
# Can also search for several variables in one call
find_questions("ESS round 1", c("tvpol", "tvtot"))
# Or use regular expressions. For example, to find all variables
# that begin with tv
find_questions(1, "^tv")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.