Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.16 KB

File metadata and controls

27 lines (21 loc) · 1.16 KB

In the beginning

Download data from link provided and unzip it to R working directory.

Install packages

dplyr and tidyr to make your life easy.

Write the R script to solve the stated problem

The "analysis.R" file executes the five steps stated in the problem. These are: 1. Merging the training and the test sets to create one data set. Reading files Assigning names to columns Merging all data in one set Extracting only the measurements on the mean and standard deviation for each measurement Reading column names Create vector for defining names, mean and standard deviation Subsetting for all merged data Using descriptive activity names to name the activities in the data set Appropriately labeling the data set with descriptive variable names Making second tidy data set Writing second tidy data set in txt file

Variables used in the script:

trainX, trainy, testX, testy, trainD and testD are the given data which subsequently converted into the dplyr dataframe using the tbl_df function. These generated a new set of data variables as presented in the code. The data were the merge together to produce a single data frame for analysis.