The run_analysis.R script assumes that the data is in a folder with the following structure:
- UCI HAR Dataset
- activity_labels.txt
- features_info.txt
- features.txt
- test
- subject_test.txt
- X_test.txt
- y_test.txt
- train
- subject_train.txt
- X_train.txt
- y_train.txt
Also, it requires write access, so it can write the tidy_data.txt file.
Basically, it executes the following steps:
- Loads data.table package, instaling it if needed;
- Loads reshape2 package, instaling it if needed;
- Loads the activity labels;
- Loads the features names;
- Determines the features of interest (mean and standard);
- Load, subset and structure the test data;
- Load, subset and structure the train data;
- Merges the training and test data;
- Modify some values to make it more readable;
- Structure the tidy data;
- Writes the tidy data file.