This is the course project for the Getting and Cleaning Data Coursera course.
The R script, run_analysis.R
, does the following:
- Downloads the dataset and unzips if it does not already exist in the working directory
- Loads the activity and feature info
- Defines a filter for mean and standard deviations to be extracted and sets up the names
- Loads both the training and test datasets, as per above filter
- Loads the activity and subject data for each dataset, and merges them as columns with the dataset
- Merges the train and test datasets
- Converts the
activity
andsubject
columns into factors - Creates a tidy dataset that consists of the average (mean) value of each variable for each subject and activity pair.
- Prints the result to the file
tidy-data.txt
.