Skip to content

limrock1/Getting_Cleaning_Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

This script is used to ruun the analysis of Samsung phone data.

Required library: reshape2

=========

The script first checks for the existence of the folder containing the data - UCI HAR Dataset. If not found, it downloads the dataset.zip, extracts and sets the extracted folder as the new working directory.

The first step is to merge all the required data from the test and training sets, namely:

  • X_test.txt & X_train.txt
  • subject_test.txt & subject_train.txt
  • features.txt (to add colnames)
  • (later I add activity info)

I then Extract all data containing calculated mean() or std() in the colnames.

Next I add the activity info to the data and rename the IDs to activity names.

  • I now merge all data into one dataframe

The colnames are tidied up to represent more human readable information

Lastly, the data is tidied up using melt() and dcast() functions from the reshape2 library.

  • The final data is written to a file - tidy_data.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages