Skip to content

Ulriksen/GettingDataProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GettingDataProject

This repository contains a R script which calculates means for the activity recognition data set from http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones.

The means are calculated according to the Coursera Get data project requirements

You should create one R script called run_analysis.R that does the following.

  1. Merges the training and the test sets to create one data set.
  2. Extracts only the measurements on the mean and standard deviation for each measurement.
  3. Uses descriptive activity names to name the activities in the data set
  4. Appropriately labels the data set with descriptive variable names.
  5. From the data set in step 4, creates a second, independent tidy data set with the average of each variable for each activity and each subject.

##Running the script The data set requires the plyr package. This can be installed using install.packages("plyr")

The data must be in the same directory as the R script, following the original data structure. I.e there should be one directory called UCI HAR Dataset in the folder containing the R script.

  1. Set working directory to the same directory as the R file using setwd
  2. Load the run_analysis.R using source("run_analysis.R")
  3. Run the script using writeMeans()
  4. A text file called averages.txt will be created in the working directory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages