An R script called run_analysis.R has been created. This does the following:
- Merges the training and the test sets to create one data set.
- Extracts the measurements on the mean and standard deviation for each measurement.
- Adds descriptive activity names to name the activities in the data set
- Labels the data set with the descriptive activity names.
- Creates an independent tidy data set with the average of each variable for each activity and each subject.
- Download the data source and unzip into a folder on your local drive. This creates a
UCI HAR Dataset
folder. - Put
run_analysis.R
in the parent folder ofUCI HAR Dataset
, then set the parent directory as your working directory usingsetwd()
function in RStudio or R. - Run
source("run_analysis.R")
, this will generate a new filetiny_data.txt
in your working directory.
run_analysis.R
depends on the reshape2
and data.table
R packages. You will need to install them if you don't already have them.