Skip to content

RonanOD/tidy_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Tidy Data

This project contains run_analysis.R: a script for tidying movement data as part of the Coursera Tidying Data project. See below for details on how to run the file and load the outputted data back into R. All variables, their units and transformations performed on the raw data are included in CookBook.md.

Requirements

  • R version 3.1.1
  • The raw data zip file downloaded and unziped in the current working directory.
  • Package plyr version 1.8.1
  • Package reshape2 version 1.4

How to run the script

  1. Download run_analysis.R from github.
  2. Download the (dataset)[https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip] and extract it to the same directory as run_analysis.R. Do not alter any folder names or file names.
  3. Open an R console and set the working directory ("wd") to where you extracted the previous files.
  4. Run these R commands to run the script.
setwd("path\to\script_and_data")
source("run_analysis.R")

To view the data output

data <- read.table("tidy_data.txt", header=TRUE, stringsAsFactors = FALSE)
head(data)

About

For Coursera Getting and Cleaning Data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages