- Content of repository:
- README.md - This file describing how run_analysis.R transforms the RAW data into the tidy data.
- CodeBook.md - A code book describing each variable and its values in the tidy data set.
- run_analysis.R - R script is the instruction list that reads the RAW data, processes it and creates the tidy ouput data
- tidy.txt - the tidy output data set
- UCI HAR DATASET/* - Folder containing the RAW data.
The latter data set was published in the following publication: [1] Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012
- Instruction list/Description of run_analysis.R The following stepts summarize the transformation implemented by the R-script.
- load table containing feature labels into memory
- lower case the labels of the features
- identify the indeces of all feature labels which contain mean or std
- load the table of activity codes and labels into memory
- replace activity labels with more readable labels
- load the subjects (both training and test) corresponding to the observation into memory
- load all feature values of all observations (both training and test) into memory having the feature names as column names
- load the activities of all observations (both training and test) into memory
- create a dataframe containing all subject, activity label and features calculating mean or standard deviation of all observations
- reshape the dataframe to have the feature names as values in column "variable" and the feature values in column "value"
- calculate the mean of feature values for each combination of subject and activity
- output a file containing the tidy data set