Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.17 KB

File metadata and controls

21 lines (11 loc) · 1.17 KB

#The steps created in run_analysis were the next:

The R version used was R-3.2.2

  1. The working directory should be set in the folder with the files that contain Get data

  2. Load the necessary package to process the databases such as: (data.table,plyr,reshape2)

  3. Read train, test, activity, labels and features databases.

  4. The names for activity labels and feature is updated by idActivity, activity and idFeatures,feature.

  5. grep is used to extract only the measurements on the mean and standard deviation for each measurement.

  6. All pieces were joining train, test, subject and activity in a unique database, the grep result is used to select only the measurements on the mean and standard deviation for each measurement. Each row is an observation and each column is a variable.

  7. Activity labels are added into the tidy dataset, using the merge function between activity labels and the tidy dataset.

  8. The functions melt and dcast are used to generate the average of each variable for each activity and each subject.

  9. The tidy data test is saved as a text dataset called tidyData.txt