Skip to content
Getting and Cleaning Data Course Project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CODEBOOK.md
README.md
run_analysis.R
tidied_data.csv
tidied_data.txt

README.md

README

This document describes the contents of this repository. It will also provide instructions on how to run the R script to transform the raw data set dictated in the Course Project into a tidy dataset.

References:

  1. Getting and Cleaning Data Course Project Assignment Page.

Contents

This section describes the contents of this repository.

Filename Description
README.md This File
CODEBOOK.md Describes the variables within the tidied dataset
run_analysis.R Analysis function of the raw data

Setup

Before running the script, the following has to be setup:

  1. The R Environment is installed.
  2. Data has been downloaded.
  3. Data has already been extracted to the default working directory of your R environment.
  4. It is assumed that the directory structure and file names of the extracted files follows that of the origin ZIP file. The only exception is that the parent directory name has been renamed to "UCI_HAR_Dataset".

Steps

To get the tidied data, please follow the following steps:

1. Source the analysis function into R and run the function.

source('<your default R working directory>/run_analysis.R'))
run_analysis()

2. Once the function has completed running, you will see two output files - "tidied_data.csv" and "tidied_data.txt" - in your working directory. These files contain the same data and are presented in CSV and TXT formats.

3. To read the files into R, please use the following functions:

# Read text file
read.table("tidied_data.txt", header=TRUE)
# Read csv file
read.csv("tidied_data.csv", header=TRUE)
You can’t perform that action at this time.