The different steps taken to merge and clean the data are briefly explained in the comments to the code in run_analysis.R.
First, the data is downloaded and saved in a working directory.
Then, train and test text files are merged seperately and then finally combined together.
The measurements are subsetted to keep only the mean or std deviation column.
The activity and subject columns is converted into factors
A tidy dataset that consists of the average (mean) value of each variable for each subject and activity pair.