Skip to content

John's Hopkins University Getting and Cleaning Data on Coursera

Notifications You must be signed in to change notification settings

l0neJT/get_clean_data01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get_clean_data

assignment 01

John's Hopkins University Getting and Cleaning Data on Coursera Please see Code_Book.md for detail on data and processing

runAnalysis.r

Read into data.table mean and standard deviation from the UCI dataset on Human Activity Recognition. Appends activty names and label columns with features. Returns mean by activity and subject either as a data.table or by writting to file specified as a CSV (returns TRUE if write successful). Procedures:

  • Load data.table package
  • Check directory for required files (returns error if files missing)
  • Create vector of columns to read limiting data to mean and standard deviation
  • Read test data and bind subjects, activity ID (Y), and measurements (X)
  • Read train data and bind subjects, activity IDs (Y), and measurements (X)
  • Bind test and train rows into single data.table
  • Add column headings
  • Merge activity labels
  • Calculate mean by activity and subject then order as ascending
  • Write to CSV if destination file specified; return data.table otherwise

About

John's Hopkins University Getting and Cleaning Data on Coursera

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages