Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 891 Bytes

File metadata and controls

25 lines (21 loc) · 891 Bytes

README

Purpose

This repository is used for the assignment submission of Getting and Cleaning Data

Files

  • run_analysis.R
  • result_data.txt
  • README.md
  • CodeBook.md

run_analysis.R

The R script run_analysis.R does the following steps,

    1. Load the subject and activity information.
    1. Load subject and activity data for test and training.
    1. Load measurement data for each dataset, only keep the required variables/columns for mean and standard deviation.
    1. Merge data with subject, activity and measurement.
    1. Merge test and training datasets.
    1. Change the variable/column name from abbreviation to descriptive names
    1. Convert 'subject' and 'activity' to factors.
    1. Create a new data set for the average of each variable for each activity and each subject.
    1. Save the result in the file 'result_data.txt'

Code Book

Code Book is in file 'CodeBook.md'