This script loads and cleans the data set Human Activity Recognition Using Smartphones, and it produces a text file of means by each measure and each activity for each subject from the processed tidy data set as the output.
specific tasks include
- loads activity_labels.txt
- loads features.txt
- loads subject_test.txt (subject id for test set data)
- loads y_test.txt (activity id for test set data)
- loads X_test.txt (test set data)
- assembles test set data frame
- loads y_test.txt (activity id for test set data)
- loads y_test.txt (activity id for test set data)
- loads subject_train.txt (subject id for training set data)
- loads y_train.txt (activity id for training set data)
- loads X_train.txt (training set data)
- assemble training set data frame
- merges training and test sets
specific tasks include
- adds activity labels
- writes to file (first tidy output)
Step 5: Creates a second, independent tidy data set with the average of each variable for each activity and each subject
specific tasks include
- loads training signal files
- loads test signal files
- assembles training set data frame
- assembles test set data frame
- merges taining and test data frames
- melts signal data
- aggregates by subject id and activity id
- gets activity labels and produce final output
- writes to file (second tidy output - means)