The script called run_analysis.R downloads data from webpage and prepares required tidy datasets. The script works as following:
- Clear workspace.
- Set data set path (dataset folder contains the downloaded and unzipped raw data).
- Set URL to zipped dataset.
- Download zip file from the given URL.
- Unzip archive.
- Remove the downloaded and unziped archive.
- Load feature names and convert them to proper names.
- Load activity labels.
- Load test data.
- Load test labels.
- Load test subjects.
- Load train data.
- Load train labels.
- Load train subjects.
- Merges the training and the test sets to create one data set.
- Extract only the measurements on the mean and standard deviation for each measurement.
- Set descriptive activity names to name the activities in the data set.
- Create appropriately labels the data set with descriptive variable names.
- Create a second, independent tidy data set with the average of each variable for each activity and each subject.
- Save the created dataset