This is a script to load, merge and tidy a set of wearable tech machine learning data.
The key file in the script is run_analysis.R
.
The two packages on which the script depends are:
magrittr
which allows the use of forward pipes ("%>%", "%<>%" etc.), andplyr
for creating a tidy version of the data set with only the means per activity and subject.
The script is divided into different sections labeled 1 through 5:
- Acquire and Combine the Data
- Extract only standard deviation and mean related features
- Appropriately label the activities using factors
- Make Column Names
- Create a Tidy Data Set
There are three functions in the script:
- DataGetunzip, which downloads and unzips the source data in a new folder
- ReadT, which reads a .txt comma-delimited file given subfolder and file name with parameters suitable for this data set, and
- TidyCreate, which creates a tidy version of the data set and saves it to a comma delimited file called tidy_data.txt