##Stated Requirements:
You should create one R script called run_analysis.R that 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.
##Methodology:
The run_analysis.R script will:
- Check for any package dependencies and install if not found. The following packages are required for this script: plyr.
- Check for the existence of the data in the working directory. If it does not find a "UCI HAR Dataset" subdirectory in the working directory, then it will download the source ZIP file from https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip and extract it.
- Read the raw test and training data and merge them.
- Label the activities according to the activity_labels.txt file, clean up the names slightly by removing "()" and "-" characters.
- Transform the Activity values to a more human-readable description (e.g "WALKING", "RUNNING", etc).
- Group the data by Subject and Activity, with the means of all aggregated measurements that included "mean()" or "std()" in their original descriptions.
- Write the new tidy data set to the output file TidyData.csv in the working directory. The format is comma-delimited text with a header row.
##Assumptions:
- Only the measurements with "mean()" or "std()" in their name will be included in the tidy data set.