Course project in Getting and Cleaning Data
Repo Content:
- README.MD - this document
- run_analysis.R - Script to generate tidy data sets
- TidyData1.txt - Data set for task 1-4 of the course project
- TidyData2.txt - Data set for task 5 of the course project
- codebook.MD - description of the data sets
Jorge L. Reyes-Ortiz, Davide Anguita, Alessandro Ghio, Luca Oneto. Smartlab - Non Linear Complex Systems Laboratory DITEN - Università degli Studi di Genova. Via Opera Pia 11A, I-16145, Genoa, Italy. activityrecognition@smartlab.ws www.smartlab.ws
script name: run_analysis.R
requires libraries:
- utils
- reshape2
script content:
- Downloading data file in ZIP format to local work directory output: data.zip
- Unziping the data file
- Reading the test and train data sets into dataframes output: subject_test, X_test, y_test, subject_train, X_train, y_train features, activity_labels
- Data sets for within both test and train are combined (subject, activity, measurements) output: test.data and train.data
- Both test and train data sets are combined output: all.data
- Column headers are applied to combined data set ouput: all.data having column header
- Selecting column index for column headers containing
mean() and std() in the header text. First two columns
Subject and Activity are added. output: column.index - Extracted data set with measurements only on mean and standard deviation output: extracted.data
- Replacing activity code with descriptive activity from activity_labels output: extracted.data 10.Write results to TidyData1.txt 11.Melt and decast data on the measures. ID are Subject and Activity. Calculate mean of all measures. output: mean.data 12.Write results to TidyData2.txt