This repository contains the script run_analysis.R and the code book pertaining to the course project for Dr. Leek, Dr. Peng, and Dr. Gaffo's 'Getting and Cleaning Data' course.
The purpose of this project is to learn and demonstrate how to aggregate and clean messy data.
The run_analysis.R script in this repository does the following:
- Merges the training and the test sets to create one data set.
- Extracts only the measurements on the mean and standard deviation for each measurement.
- Uses descriptive activity names to name the activities in the data set
- Appropriately labels the data set with descriptive activity names.
- Creates a second, independent tidy data set with the average of each variable for each activity and each subject.
Only four steps are required to accomplish the goals of the project and generate the final text file.
- Download the data and store it in a folder on your local drive
- Change the working direction within setwd() in the run_analysis.R script to the folder where the data is stored
- Change the location where you want the final text file written out to (within write.table() function at the end of the script)
- Run the rest of the script
See codebook.md for additional details.