This is a submission for Getting and Cleaning Data course project.
The script can be found in run_analysis.R
The script works as follow:
- Read and extracts the header from the features file
- Load Activites
- Load Test set (X_test) and add header to it
- Remove Unwanted columns out from test set.
- Add Activites to test set.
- Add Subject name to test set
- Load Train set and add header to it
- Remove Unwanted columns from the train set
- Add Activites to train set
- Add Subject name to train set
- Merge both sets as a merged set
- Create Group Based on Subject and Activity
- Calculate the mean for each group
- Replace activity numbers by names
- Remove Group Column
- Write file
Cookbook can be found in: https://github.com/mkalioby/CD_Project/blob/master/CookBook.md