Loading and Cleaning Small Datasets in R
08–A: Learning Outcomes
In this module, we will be learning how to:
Download a dataset from Qualtrics and open our dataset in Excel.
Delete columns that we do not need to make our dataset more management to work with.
Rename column headings to make sense to us.
Spot missing data in a dataset and think about how to handle that missing data.
Compile variables into a single outcome variable for running analyses.
If you want to view the Qualtrics survey that we collected the example data from, you may view the survey here:
https://umdsurvey.umd.edu/jfe/form/SV_a5XHsNPL2U7oZ1A
Please download the example data here:
https://drive.google.com/file/d/13v4FsUCWkqQmrepiJEpzgvuvgcOC4S_x/view?usp=sharing
Video (0:36)
08–B: Downloading a Dataset in Qualtrics and Opening in Excel
UMD students should navigate to: umdsurvey.umd.edu
Non-UMD affiliates may be able to access Qualtrics through their own institution or may export their excel dataset from any other data collecting source.
Video (3:32)
08–C: Deleting Unnecessary Columns
Video (1:47)
08–D: Renaming Columns
Video (3:11)
08–E: Handling Missing Data
Video (2:21)
08–F: Creating A Single Outcome Variable
Video (4:32)
Now we're ready to move our excel file into R! Groovy!
Image by Allison Horst @allison_horst
Test Your Knowledge
LINK TO GOOGLE QUIZ: https://drive.google.com/drive/folders/1l4ukBnLseOen4CRzir4OzwkReUUF21gr?usp=sharing
References
Chapter image made using with Canva ©2021 https://www.canva.com/
Horst, A. R for Excel Users. https://www.allisonhorst.com/post/r-for-excel/ License CC-BY-SA 4.0
Microsoft Microsoft Corporation. (2018). Microsoft Excel. Retrieved from https://office.microsoft.com/excel
The data for this example was generated using Qualtrics software, Version XM of Qualtrics. Copyright © 2021 Qualtrics. Qualtrics and all other Qualtrics product or service names are registered trademarks or trademarks of Qualtrics, Provo, UT, USA. https://www.qualtrics.com and provided by Emily Forgo.
Interested in Learning More?
https://cran.r-project.org/doc/contrib/de_Jonge+van_der_Loo-Introduction_to_data_cleaning_with_R.pdf
This publication goes into detail about cleaning data in R
This website includes packages from tidyverse used to clean data in R if you are interested
For more information about Qualtrics datasets: https://www.qualtrics.com/support/survey-platform/data-and-analysis-module/data/download-data/understanding-your-dataset/
More R instructional notes: https://www.statology.org/r-guides/ © 2021 Statology