#The steps created in run_analysis were the next:
The R version used was R-3.2.2
-
The working directory should be set in the folder with the files that contain Get data
-
Load the necessary package to process the databases such as: (data.table,plyr,reshape2)
-
Read train, test, activity, labels and features databases.
-
The names for activity labels and feature is updated by idActivity, activity and idFeatures,feature.
-
grep is used to extract only the measurements on the mean and standard deviation for each measurement.
-
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.
-
Activity labels are added into the tidy dataset, using the merge function between activity labels and the tidy dataset.
-
The functions melt and dcast are used to generate the average of each variable for each activity and each subject.
-
The tidy data test is saved as a text dataset called tidyData.txt