R Cleaning Data Course
The script performs the following steps to run the analysis
- It reads the actual data, the subjects and the activities for both the train and the test dataset
- It reads reference data, i.e. the variable names (from feature.txt) and the list of activity codes and the corresponding labels
- It merges the test and the train data sets
- It sets the variable names from feature.txt as variable names in the merged data set
- It extracts all variables with std() or mean()
- It adds the subjects to the merged data set
- It adds activity labels to the merged data set
- It calculates the mean for all variables, grouped by subject and activity
- It writes the merged data set and the average data set to file