README.md
-
Load the data. Paths in script are preset for the case when zip file was unzipped into working directory
-
Files to be read: X_test.txt, y_test.txt, subject_test.txt, X_train.txt, y_train.txt, subject_train.txt
-
Merge data from files: *_text.txt and *_train.txt are combined be columns, resulting data sets are combined into one by rows.
-
Renaming procedures. Name for each column is taken from features.txt and two additional names are also added.
-
Change activity ID number with descriptive names.
-
With grep function get indices of columns which contains patterns "mean" and "std".
-
Subset data based on obtained indices.
-
With melt function from reshape2 package put all columns except "subject" and "Activity" into one column.
-
Apply ddply function from plyr package to get mean for each feature per subject and activity.
-
??????
-
PROFIT! :)