Contents of GCData repository:
README.md-- readme file.CodeBook.md-- description of datafields intidyDataset.txt.run_analysis.R-- the R scrip that generatestidyDataset.txt.tidyDataset.txt-- the resulting tidy dataset.
Step-by-step description of data manupulations performed by run_analysis.R:
- Script downloads (if it was not loaded before) the original dataset (https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip), saves it in working directory/UCI HAR Dataset.
- Script loads the activity labels 'UCI HAR Dataset/activity_labels.txt' and feature info 'UCI HAR Dataset/features.txt'.
- Script loads training 'UCI HAR Dataset/train/.txt'* and test 'UCI HAR Dataset/test/.txt'* datasets, keeping data columns that contain mean or standard deviation, creates two datasets:
train,test. - Script loads the
activityandsubjectdata for each dataset (train,test), combines columns for each dataset. - Script merges the
trainandtestdatasets, adds labels. - Script converts the
activityandsubjectcolumns into factors. - Script creates tidy dataset
allDatathat consists of the average (mean) value of each variable for each (subject,activity) pair. - Script saves
allData.meanastidyDataset.txtfile in working directory.