Clean-up and collate data contained in several tables recording detailed parameters on Human Activity Recognition using smartphones.
CodeBook.md: Describes the variables in the data and transformations done to tidy up the data.README.md: This file.run_analysis.R: An R script that runs on the data, analyzes it and tidies it up.
The run_analysis.R script depends mostly on the base package of R and some functions from the reshape2 package.
reshape2 should be installed by default in your R installation, but if it isn't installed, please install it using install.packages("reshape2").
- Download and unzip the dataset (should be titled as
getdata-projectfiles-UCI HAR Dataset.zip) in your working directory (in whichrun_analysis.Ris present). - On unzipping, a directory called
UCI HAR Datasetshould be created in the working directory. It is necessary that the name of this directory be preserved as the script looks for a directory with this name for its data files. - In your R environment, type
source("./run_analysis.R")to run the script. - After performing the analysis, if successful, the script should produce a tidied up and summarized table contained in a new file called
tidydata.txt. - The table created in step 4 can be opened in a text editor for viewing.
- The table created in step 4 can also be easily imported back into R using
read.table("./tidydata.txt", header=TRUE).