Skip to content

cfkhor/Getting_and_Cleaning_Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting_and_Cleaning_Data

Source of the original data: https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip

Original description: http://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones

(Copies of the important files have been put into this main directory to fulfill the submission requirement)

Instructions:

  1. Unzip the source (https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip) into a folder on your local drive, for example C:\Users\yourname\Documents\R\

  2. Put run_analysis.R into C:\Users\yourname\Documents\R\UCI HAR Dataset\

  3. In R Console: setwd("C:\Users\yourname\Documents\R\UCI HAR Dataset\"), followed by: source("run_analysis.R")

  4. Use data <- read.table("dataset_with_avg_var") to read the data.

The attached R script (run_analysis.R) performs the following clean up and new data set:

  1. Merges the training and test sets (train/X_train.txt and test/X_test.txt) and create one data set, i.e cleaned_merge_data.txt

  2. Reads features.txt and extracts only the measurements on the mean and standard deviation for each measurement

  3. Reads activity_labels.txt and applies descriptive activity names to name the activities in the data set

  4. The script also appropriately labels the data set with descriptive names

  5. Lastly, the script creates a 2nd, independent tidy data set with the average of each measurement for each activity and each subject

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages