-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript2.R
More file actions
40 lines (39 loc) · 1.72 KB
/
Copy pathscript2.R
File metadata and controls
40 lines (39 loc) · 1.72 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# script2.R
#
# Performs step 2 in the Code Book.
#
# This script reads the files into R data frames.
#
# table_name <- read.table("filename.txt") where table_name = filename
#
# it is assumed that all source files are in the 'work' directory and
# getwd() also returns the 'work' directory
#
activity_labels <- read.table("activity_labels.txt")
body_acc_x_test <- read.table("body_acc_x_test.txt")
body_acc_x_train <- read.table("body_acc_x_train.txt")
body_acc_y_test <- read.table("body_acc_y_test.txt")
body_acc_y_train <- read.table("body_acc_y_train.txt")
body_acc_z_test <- read.table("body_acc_z_test.txt")
body_acc_z_train <- read.table("body_acc_z_train.txt")
body_gyro_x_test <- read.table("body_gyro_x_test.txt")
body_gyro_x_train <- read.table("body_gyro_x_train.txt")
body_gyro_y_test <- read.table("body_gyro_y_test.txt")
body_gyro_y_train <- read.table("body_gyro_y_train.txt")
body_gyro_z_test <- read.table("body_gyro_z_test.txt")
body_gyro_z_train <- read.table("body_gyro_z_train.txt")
features <- read.table("features.txt")
# (note that features_info.txt has been omitted because it's not data)
subject_test <- read.table("subject_test.txt")
subject_train <- read.table("subject_train.txt")
total_acc_x_test <- read.table("total_acc_x_test.txt")
total_acc_x_train <- read.table("total_acc_x_train.txt")
total_acc_y_test <- read.table("total_acc_y_test.txt")
total_acc_y_train <- read.table("total_acc_y_train.txt")
total_acc_z_test <- read.table("total_acc_z_test.txt")
total_acc_z_trainv <- read.table("total_acc_z_train.txt")
X_test <- read.table("X_test.txt")
X_train <- read.table("X_train.txt")
y_test <- read.table("y_test.txt")
y_train <- read.table("y_train.txt")