This file explains the content of the repository and how to run the run_analysis.R script.
- The original dataset (UCI_HAR_Dataset.zip).
- The original dataset unzipped (UCI HAR Dataset).
- The tidy dataset (Cleaned_data.txt).
- The codebook for the tidy dataset (CodeBook.md).
- The new independent dataset (new_dataset.txt).
To run the script use source("run_analysis.R") command in RStudio. You can optionally change destination file names in the first section of the script. The script performs the following steps:
- Sets paths and file names.
- Downloads and unzip the dataset.
- Merges the training and the test sets to create one data set.
- Extracs only the measurements on the mean and standard deviation for each measurement.
- Sets descriptive activity names to name the activities in the data set.
- Labels the data set with descriptive variable names.
- Creates a second, independent tidy data set with the average of each variable for each activity and each subject.