This project contains an R script called run_analysis.R that downloads, extracts and tidys - as explained in CodeBook.md - data from Human Activity Recognition Using Smartphones.
The script depends on the R package dplyr being installed. It can be installed with install.packages("dplyr") in R, if it is not already installed.
Please note that you need an internet connection if you don't have the source dataset available locally. The script will download and extract the raw data from the website into the working directory. If Dataset.zip exists it will not be downloaded again. If the directory UCI HAR Dataset doesn't exist the zip file will be extracted.
To run this script after cloning the repository:
- cd into the directory
getdata_project. - Start R.
- Source the script with
source("run_analysis.R").
After the script finished without errors there will be a file result.txt with the tidy result data in this directory.
This text file can be loaded into R for inspection with
d <- read.table("result.txt", header=TRUE, as.is=TRUE).