The script make the following steps :
Test set :Open training set file and store in data_Xtest Training set : open test set file and store in data_Xtrain
Select data with variable wich contain characters "mean" Select data with variable wich contain characters "std"
Loop to change values
Formating testing names and then training names Merge data names with "mean" and "std"
5. Second independent tidy data set with the average of each variable for each activity and each subject
summarise data by taking the mean of each variable for each activity and each subject. Contains 6x30 observations of the 88 variables from the final data set.
- 6 : number of activity
- 30 : number of vulunteers
- The mean is obtained by grouping observations in the final data set with the subject IDs then the activity labels.