Description
Search and Examine Variables Across Survey Datasets.
Description
Search for variables across multiple survey datasets, examine variable properties (labels, values, missingness), and explore variable context within datasets. Useful for navigating complex survey data with many variables and understanding variable relationships and metadata.
README.md
surveysearch
Search and examine variables across survey datasets with ease.
Overview
surveysearch provides tools to navigate complex survey data with many variables. It helps you:
- Search for variables by name or label across datasets
- Examine variable properties including labels, values, and missingness patterns
- Explore variable context to understand survey structure and questionnaire flow
Installation
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("malo-raballand/surveysearch")
Usage
Search for variables
# Search for variables containing "education"
search_variables("educ")
# Store results for further analysis
results <- search_variables("income")
View(results)
Examine a variable
# Display detailed information about a variable
examine_variable("age", data = my_dataset)
# Get information without printing
info <- examine_variable("income", data = my_dataset, verbose = FALSE)
Show variable context
# See a variable's position in the survey with surrounding questions
show_variable_context("q501", data = my_dataset)
Functions
search_variables()- Search for variables across datasetsexamine_variable()- Get detailed information about a specific variableshow_variable_context()- View a variable's context within a dataset
Requirements
- R >= 3.5.0
haven- for reading Stata, SPSS, and SAS filesdplyr- for data manipulationtidyr- for tidying data
License
MIT License - see LICENSE file for details
Author
Malo Raballand ([email protected])