forked from Mawriz/Getting-and-Cleaning-Data-Course-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCodeBook.html
27 lines (21 loc) · 1.16 KB
/
CodeBook.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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.