Author: Weichen Wang
This document aims to explain underlying assumption and logic behind run_analysis.R.
-
- run_analysis.R file will read UCI HAR Dataset under the condition that current working directory has "UCI HAR Dataset" folder. Inside the folder, "train" and "test" folders are also present.
-
- Mean and standard deviation extracted does not include those variables of meanFreq(). Only mean() and std() are included in the final tidy data set.
-
- Read raw data files into memory (features.txt, activity_labels.txt, X_train.txt, y_train.txt, X_test.txt, y_test.txt, subject_train.txt, subject_test.txt)
-
- Add subject and label columns into training and testing sets.
-
- Merge training and testing sets.
-
- Changing column names into descriptive feature names.
-
- Extract mean and std columns from merged table.
-
- Calculate average of each feature variable in merged table for each subject and each activity.
-
- Export the final tidy data table into .txt file for future processing and analysis.