##Getting and Cleaning Data: Course Final Project ###Human activity recognition data collected with a waist-mounted smartphone
To reproduce the accompanying data sets (found in the repository as Tidy.csv
and means-stds.csv
), follow these steps:
- Download and unzip the raw source data from here
- A description of the original data collection procedure can be found here
- Download the
run_analysis.R
file and place it in the same folder as the unzipped data.- The file should be at the same level as
features.txt
,features_info.txt
etc. from the raw data. - The
test/
andtrain/
subfolders should also exist alongside these files.
- The file should be at the same level as
- Change the working directory to wherever you have placed the file, and run
source("run_analysis.R")
from within R. This should locally create the filesTidy.csv
andmeans-stds.csv
. The contents of these two files are described in the codebook.- The code also creates two data frames in memory, named
Tidy
andX
containing the corresponding data.
- The code also creates two data frames in memory, named
- The code does not require loading any additional libraries.
- The code begins by cleaning the environment through
rm(list=ls()
to prevent potential conflicts. Make sure you store any unsaved objects prior to running the code!