CodeBook for Getting and Cleaning Data course project on Coursera.
This project creates tidy data from the Human Activity Recognition Using Smartphones Data Set. This data set associates measurements taken from the accelerometers and gyroscopes of the Samsung Galaxy S smartphone with different types of human motion. See http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones for more information, including the source data.
-
Subject: the individual performing the trial. 30 total.
-
Activity: what the subject was doing. 6 total: walking, walking upstairs, walking downstairs, sitting, standing, laying.
-
Features: measurements taken while a subject was doing an activity. 66 total, all representing averages for a given subject and activity.
-
Test and train data are combined into single data frames using rbind.
-
Features data is filtered using grepl to include ONLY mean and standard deviation values.
-
Data frames for subject, activity, and included features are combined into one master data frame using cbind.
-
The master data frame is further processed using colMeans within a nested for loop to calculate averages of feature data for each subject performing each activity. These averages are added to a final tidy data frame.
-
Finally, the tidy data is output to a .txt file.