This file explain how run_analysis.R works.
- The data is extracted from the following source in the .zip format: https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
- Data is extracted into the working directory.
- The script creates a new directory 'combined' in the working directory
- A new directory structure is created under combined similar to that under train and test directories
- The script creates two vetors for all the files under train and test directories. Data in all the test and train files is later merged and writtent to the files under the combined directory. The files under directory follow the same naming rules as that followed by the files under test and train directories.
- Now, the feature vector is created that defines the column names of all the columns in the X_combined.txt, which contains the merged data for X_test.txt and X_train.txt.
- X_combined is read.
- Column names are applied to the table read from X_combined.txt.
- All the columns that measure mean or standard deviation are extracted in a new dataset.
- Mean is calculated over all the colums in this dataset and written to tidydata.txt files under the combined directory.