Wearable accelerometer analysis
All the real work is in wearable_project_log.Rmd
See my Codebook.md for a description of the contents of the output files
Instructions to reproduce my work
- Clean out your environment
- Load and run the file run_analysis.R. This will define a function run_analysis and a few auxiliary functions.
- Download the Samsung data. It comes in a file called UCI HAR Dataset.zip.
- Save it by itself in a fresh directory. No need to unzip!
- setwd() to that directory in R
- Say run_analysis() and admire the progress messages (I hope!) and ignore the warnings.
You will get a lot of progress messages. There are also some warnings in the final phase of the analysis, the calculation of aggrgates, which I haven't been able to eliminate but which are harmless.
At the end, you should have the following files:
|UCI_HAR_means.csv||Dataset stripped down to just the -means() and -std() features|
|UCI_HAR_summary.csv||Dataset further summarized to averages over subject and activity|
Note on interpretation of the assignment
I assumed the instruction Extracts only the measurements on the mean and standard deviation for each measurement meant to select only the columns corresponding to features ending in -mean() and -std(). These come in pairs, one of each. There are also features like fBodyBodyGyroJerkMag-meanFreq() and angle(Z,gravityMean) that seem differently specied. If it were necessary to include them, the place to make the necessary changes is highlighted in run_analysis.R