The purpose of this project is to demonstrate the ability to collect, work with, and clean a data set. The goal is to prepare tidy data that can be used for later analysis.
Here are the data for the project:
https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
This is the script to generate the tidy data set (see tidydata.txt
).
The script will:
- Download the source data using the link above (hard coded into the script).
- Unzip the data file.
- 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 tidy data set with the average of each variable for each activity and each subject.
Copy run_analysis.R
to your working directory.
In R, run
source('run_analysis.R', echo=TRUE)