This is the project assignment for Getting and Cleaning Data course in coursera. The purpose of this projcet is to practice how to prepare tidy data that can be used for further statistical analyisis. In this project, we are asked to handle the Human Activity Recognition Using Smartphones Dataset. Here I presented my code and tidy data set to fulfill the course project.
You should create one R script called run_analysis.R that does the following.
- 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 activity names.
- Creates a second, independent tidy data set with the average of each variable for each activity and each subject.
Just issue the following command
Rscript run_analysis.R
Make sure you have the origial dataset in the same directory and called "data/".
- CodeBook.md: desctiption about the features
- run_analysis.R: The complete code used to generate tidy data and the mean data
- combined_data.csv: tidy data including only "mean" and "std" from original dataset
- mean_combined_data.csv: average of each variable for each activity and each subject
- Only feature name including "mean" and "std" are included. "meanFreq" is ignored.
- Use data.table to increase efficiency