This repository contains the files for the Johns Hopkins Coursera Getting and Cleaning Data course project.
run_analysis.R: R script that downloads, cleans, merges, and summarizes the data.CodeBook.md: Describes the source data, variables, and transformations.tidy_data.txt: Final tidy data set created by runningrun_analysis.R.
- Put
run_analysis.Rin your working directory. - Open R or RStudio.
- Set your working directory to the folder containing
run_analysis.R. - Run:
source("run_analysis.R")The script downloads and unzips the data if needed, then creates tidy_data.txt in the working directory.
The script performs the following steps:
- Merges the training and test sets into one data set.
- Extracts only mean and standard deviation measurements.
- Uses descriptive activity names.
- Labels variables with descriptive names.
- Creates a second tidy data set with the average of each variable for each activity and subject.