Skip to content

lisakaser/Getting_and_cleaning_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to use the files in this folder to get the tidy data required for the assignement

What is needed before running the code (run_analysis.R):

Good to know about running and understanding the code:

  • The item numbers below line up item numbers in the code

What the code does

    1. prepare the R workspace and R environment
    • workspace gets cleaned
    • library plyr and dplyr get loaded (warning: dont change the order of the loading of these libraries, else code will not work)
    1. Loades and merges data sets (X_tain.txt and X_test.txt) using features.txt as (preliminary) column names. Merged data set is saved in variable "all_data"
    1. Only mean() and standard deviation (std()) of each measurement are selected and saved in variable "mean_and_std_data"
    1. Training and test labels are loaded from the y_train.txt and y_test.txt files and translated into an descriptive activity name using the translation in the activity.labels.txt
    1. preliminary columnlabels from 1. are translated into descriptive variable names.
    • Note: "BodyBody" was renamed as "Body" as I interpreted it as an error. Reason: Nowhere was a single "Body" so the doubeling "BodyBody" didnt seem necessary
    1. From the "mean_and_std_data" data set that has now descriptive variables a new indipendent data set averaging each variable for activity and subject is created using the 'aggregate()' function and this new data called "new_Data" is saved into a .txt file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages