Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

robinwang/GCDProject

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 
 
 

Repository files navigation

Human Activity Recognition Using Smartphones Dataset

Getting and Cleaning Script (run_analysis.R)

Author: Weichen Wang

This document aims to explain underlying assumption and logic behind run_analysis.R.

Assumption:

    1. run_analysis.R file will read UCI HAR Dataset under the condition that current working directory has "UCI HAR Dataset" folder. Inside the folder, "train" and "test" folders are also present.
    1. Mean and standard deviation extracted does not include those variables of meanFreq(). Only mean() and std() are included in the final tidy data set.

run_analysis.R:

    1. Read raw data files into memory (features.txt, activity_labels.txt, X_train.txt, y_train.txt, X_test.txt, y_test.txt, subject_train.txt, subject_test.txt)
    1. Add subject and label columns into training and testing sets.
    1. Merge training and testing sets.
    1. Changing column names into descriptive feature names.
    1. Extract mean and std columns from merged table.
    1. Calculate average of each feature variable in merged table for each subject and each activity.
    1. Export the final tidy data table into .txt file for future processing and analysis.

About

Project for "Getting and Cleaning Data" on Coursera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.