This codebook describes the Variables, data and transformatiosn that are used in "run_analysis.r" R-Script.
- train: contains the training data "X_train.txt" with the extra columns: "y_train.txt" and subject_train.txt.
- test: contains the test data "X_test.txt" with the extra columns: "y_test.txt" and subject_test.txt.
- ttdata: the training data "train" unioned with the test data "test". This set is reused when selecting only the necessary features.
- names(): fives the names to the columns of the table/ data.frame.
- features: the features from the "features.txt" file.
- selectedfeatures: the features that contain "mean()" or "std()".
- activities: the labels of the activities.
- result: the final result of the "run_analysis.R" script, aggregates the ttdate with the "aggregate" function on the two columns "activity" and "subject" and applies the function mean to the other columns.
The "run_analysis.R" script is devided into 5 (+1 additional) parts.
- Merges the training and the test sets to create one data set.
- Extracts only the measurements on the mean and standard deviation for each measurement.
- Uses descriptive activity names to name the activities in the data set
- Appropriately labels the data set with descriptive variable names.
- From the data set in step 4, creates a second, independent tidy data set with the average of each variable for each activity and each subject.
- Writes the output to file named "run_analysis.txt"