Skip to content

Repo for programming assignment of Coursera course Getting and Cleaning Data by Professor Jeff Leak

Notifications You must be signed in to change notification settings

attarwala/cleaningdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Getting and Cleaning Data

This repo contains the run_analysis.R script, which is part of the Peer Review Programming Assignment for coursera course Getting and Cleaning Data by Prof. Jeff Leak. The script takes single input argument, "working directory". The working directory is where the data files are present. So for e.g. if the data files are located at

Murtuzas-Mac-mini:UCI HAR Dataset murtuza$ pwd

/Users/murtuza/coursera/gettingdata/project/UCI HAR Dataset

Murtuzas-Mac-mini:UCI HAR Dataset murtuza$ ls

README.txt                features.txt        result.txt        test
activity_labels.txt        features_info.txt        run_analysis.R        train

The script should be called as run_analysis("/Users/murtuza/coursera/gettingdata/project/UCI\ HAR\ Dataset")

Alternatively, from the R console one can also do
setwd("/Users/murtuza/coursera/gettingdata/project/UCI\ HAR\ Dataset")
run_analysis(getwd())

The output of the script is the cleaned up dataset as required by the assignment. The script returns the data.frame object of the tidy dataset, so if you don't want your console to be filled with data after the script is called, you can store the result in a variable, as shown below

tidyDataset <- run_analysis("/Users/murtuza/coursera/gettingdata/project/UCI\ HAR\ Dataset")

Now tidyDataset has the cleaned up data.frame object.

About

Repo for programming assignment of Coursera course Getting and Cleaning Data by Professor Jeff Leak

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages