Dataset: https://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones
Script name: run_analysis.R
Developed by:
Harish K. Rongala
run_analysis.R script consists of 9 steps
-
Download data set from internet and extract to working directory
-
Read training and testing data
-
Combining data and renaming variable names
-
Giving descriptive activity names to name the activities in data set
-
Extracting only measurements on mean() and std()
-
Giving fully descriptive names to the variables in the data set
-
Merging training and test data in to one data set
-
Calculate average of each variable for combination of 'subjectid' and 'activity'
-
Export tidy data set
-> Place 'run_analysis.R' in your R working directory
-> Run the script
-> Output file 'tidyDataset.txt' is created in "UCI HAR Dataset" folder
-> To read the data - use the following command
> data<-read.table("./tidyDataset.txt",header=TRUE)