Running the script
- Clone this repository
- Download the data set and extract. It should result in a
UCI HAR Datasetfolder that has all the files in the required structure. - Change current directory to the
UCI HAR Datasetfolder. - Run
Rscript <path to>/run_analysis.R - The tidy dataset should get created in the current directory as
tidy.txt - Code book for the tidy dataset is available here
Assumptions
- The training and test data are available in folders named
trainandtestrespectively. - For each of these data sets:
- Measurements are present in
X_<dataset>.txtfile - Subject information is present in
subject_<dataset>.txtfile - Activity codes are present in
y_<dataset>.txtfile
- Measurements are present in
- All activity codes and their labels are in a file named
activity_labels.txt. - Names of all measurements taken are present in file
features.txtordered and indexed as they appear in theX_<dataset>.txtfiles. - All columns representing means contain
...mean()in them. - All columns representing standard deviations contain
...std()in them.