The script is invented to analyze the data from UCI HAR Dataset. It's supposed that archive is extracted to the working directory.
The following files from the initial dataset is used:
features.txt - includes the descriptions for features measured train/X_train.txt - includes the measurements of the features in train set (one row - 1 measurement of 561 features) test/X_test.txt - includes the measurements of the features in test set train/subject_train.txt - subject for each measurement from the train set test/subject_test.txt - subject for each measurement from the test set train/y_train.txt - activity (from 1 to 6) for each measurement from the train set test/y_test.txt - activity (from 1 to 6) for each measurement from the test set
Script involves the following stages:
- Download data into R
- Rename columns of the data sets to make them more friendly
- column-bind all data sets
- row-bind train and test bind
- select only the columns with that mention mean or std
- create another data.frame that separates data by subject and calculate mean
- create another data.frame that separates data by activity and calculate mean