Create one R script called run_analysis.R that does the following.
- Merges the training and the test sets to create one data set.
- Extracts only the measurements on the mean and standard deviation for each measurement.
- Uses descriptive activity names to name the activities in the data set
- Appropriately labels the data set with descriptive activity names.
- Creates a second, independent tidy data set with the average of each variable for each activity and each subject.
- README.md: This document
- CodeBook.md: Codebook describing variables, data, and transformations
run_analysis.R
: R code
- Run
source("run_analysis.R")
. - The script creates "data" folder under the current working directory, that is "./data".
- The script downloads the data (a zip file) and unzips files under the "./data" folder.
- The script loads data from various text files, merges, and aggregates data as appropriate.
- Finally, a tidy data file,
tidy.txt
, is written under the current working directory.
run_analysis.R
uses dplyr
and data.table
packages. The script installs them if not already installed.