This is a repository with code for the project for Getting and Cleaning Data.
The assignment is here. It was to read data from the "Human Activity Recognition Using Smartphones" data set, and create an R script taht 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 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.
To run my R script, do the following:
- Download the data here.
- Extract the data from the .zip file.
- Place the r script run_analysis.R into the unzipped directory.
After that, you can run the R script (run_analysis.R)
Also, note that the r script requires the plyr library. It can be downloaded and installed by running: install.packages("plyr")
Once run, the R script creates a tidy data set, tidy.txt.
More details can be found in the code book.