-
Files ‘X_train’, ‘Y_train’ and ‘subject_train’ were read into R and given similar data frame names.
-
Files ‘X_test’, ‘Y_test’ and ‘subject_test’ were read into R
-
the features.txt file was read in and list of features extracted and then use label the column names in the x_train and x_test data sets.
-
data frame with similar dimensions were bound together (bind, rbind), i.e. x_train with x_test and subject_train with subject_test.
-
Select measurements of MEAN and STD in combined data (x_full)
-
Add Subject ID's and Activity ID to the dataset
-
Rename cols for Subject ID
-
Replace Activity ID's with descriptive activity names
-
Create a 'tidy_dataset' with the calculated means for each
-
Write 'tidy dataset.’txt to a .txt file
** to Read 'tidy dataset.txt’ back into R run the following code. (courtesy of David Hood FAQ)
data <- read.table(‘tidy_data.txt’, header = TRUE) View(data)