library(dplyr) library(doubleheadr) library(gt)
This package provides helper functions for data exports from SurveyMonkey. Most useful will likely be the clean_headr()
function, which will concatenate the column names + first row values from a SurveyMonkey data export that is .csv
or .xlsx
.
Exported SurveyMonkey data contains a column and a second row containing column-name data, which typically requires data cleaning before starting analysis.
doubleheadr
?Adopting clean_headr
+ trim_headr
will (hopefully) make your workflow more efficient.
Quick and simple approach when working with downloaded or inherited .csv
or .xlsx
files, or when there are too many responses to pull via API. (Another highly recommended solution for Advantage and Premier-level users is pulling data via the SurveyMonkey API with the surveymonkey package.)
This package is in the early stages of development. Any and all issues are welcome, please report them and I will be happy to troubleshoot anything that comes up.
clean_headr
concatenates values from column names and the first row so that it makes sense.
trim_headr
trims long strings from column names.
flag_mins
flags respondents not meeting a minimum duration in minutes to complete the survey.
flag_text
flags rows where a certain string value is found. This can be used to look for keywords, PII, or depending on your audience, profanity and other vulgarities.
doubleheadr
devtools::install_github('mattroumaya/doubleheadr')
Your downloaded or inherited .csv
/.xlsx
file will look something like the demo included in doubleheadr
.
No worries though! Cleaning your column names is as easy as 1,2... that's it! Two steps.
Start with unhelpful column names:
colnames(doubleheadr::demo)
1. clean_headr()
Now you have some really long column names
You can make them easier to read by setting clean_names == FALSE
demo %>% clean_headr(., "...") %>% colnames(.)
demo %>% clean_headr(., "...") %>% trim_headr(., c("please_provide_your_contact_information_", "i_wish_it_would_have_", "_response")) %>% colnames(.)
demo
soon...Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.