-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
171 lines (171 loc) · 5.46 KB
/
.Rhistory
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
source("run_analysis.R")
ls()
rm(list = ls())
source("run_analysis.R")
source("run_analysis.R")
source("functions.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
rm(list = ls())
source("run_analysis.R")
source("run_analysis.R")
rm(list = ls())
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
file_features = "./features.txt"
features <- read.csv(file_features, head=FALSE, sep=" ")
str(features)
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
rm(list = ls())
source("run_analysis.R")
rm(list = ls())
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
file_features = "./features.txt"
features <- read.csv(file_features, head=FALSE, sep=" ")
features
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
features_mean_and_std
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
source("run_analysis.R")
features_mean_and_std
source("run_analysis.R")
columns_with_mean_and_sts
source("run_analysis.R")
columns_with_mean_and_sts
str(subject_data)
str(x_data)
str(y_data)
head(x_data)
str(x_data)
source("run_analysis.R")
rm(list = ls())
setwd("C:/Users/Rod/Documents/coursera/data-science/03_gettingAndCleaningData/project/UCI HAR Dataset/")
file_subject_test = "./test/subject_test.txt"
file_x_test = "./test/X_test.txt"
file_y_test = "./test/y_test.txt"
file_subject_train = "./train/subject_train.txt"
file_x_train = "./train/X_train.txt"
file_y_train = "./train/y_train.txt"
subject_test <- read.csv(file_subject_test, head=FALSE)
subject_train <- read.csv(file_subject_train, head=FALSE)
subject_data <- rbind(subject_test, subject_train)
x_test <- read.csv(file_x_test, head=FALSE, sep=" ")
x_train <- read.csv(file_x_train, head=FALSE, sep=" ")
x_data <- rbind(x_test, x_train)
str(x_test)
str(x_train)
?read.fwf
?read.csv
x_test <- read.csv(file_x_test, head=FALSE, sep="")
x_train <- read.csv(file_x_train, head=FALSE, sep="")
x_data <- rbind(x_test, x_train)
str(x_data)
columns_with_mean_and_sts
rm(list = ls())
source("run_analysis.R")
columns_with_mean_and_sts
head(x_data)
head(x_data)
head(columns_with_mean_and_sts)
head(features_mean_and_std)
columns_with_mean_and_sts[] <- "V" + columns_with_mean_and_sts[]
columns_with_mean_and_sts[] <- "V" + toString(columns_with_mean_and_sts[])
for (i in lenth(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- "V" + toString(columns_with_mean_and_sts[i])
}
for (i in dim(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- "V" + toString(columns_with_mean_and_sts[i])
}
columns_with_mean_and_sts
for (i in dim(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- c("V", toString(columns_with_mean_and_sts[i]))
}
columns_with_mean_and_sts
dim(columns_with_mean_and_sts)
for (i in length(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- c("V", toString(columns_with_mean_and_sts[i]))
}
length(columns_with_mean_and_sts)
columns_with_mean_and_sts
for (i in length(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- paste("V", toString(columns_with_mean_and_sts[i]), sep = "")
}
columns_with_mean_and_sts
for (i in length(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
columns_with_mean_and_sts
for (i in 1:length(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
columns_with_mean_and_sts
for (i in 1:(length(columns_with_mean_and_sts) - 1) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
for (i in 1:(length(columns_with_mean_and_sts) - 1)) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
columns_with_mean_and_sts
length_columns_with_mean_and_sts <- length(columns_with_mean_and_sts) - 1
for (i in 1:length_columns_with_mean_and_sts) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
columns_with_mean_and_sts
for (i in 1:length(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
columns_with_mean_and_sts
features_mean_and_std <- extract_mean_and_std(features)
columns_with_mean_and_sts <- features_mean_and_std[[1]]
for (i in 1:length(columns_with_mean_and_sts)) {
columns_with_mean_and_sts[i] <- paste("V", columns_with_mean_and_sts[i], sep = "")
}
columns_with_mean_and_sts
head(x_data)
columns_with_mean_and_sts
x <- x_data[x_data$index %in% columns_with_mean_and_sts,]
head(x)
x
head(x_data, 1)
head(x_data, 1)
head(x_data, 1)
head(x_data, 5)
?subset
names(x_data)
features_mean_and_std <- extract_mean_and_std(features)
columns_with_mean_and_sts <- features_mean_and_std[[1]]
x_data_mean_and_std <- x_data[, columns_with_mean_and_sts]
x_data_mean_and_std
head(x_data_mean_and_std, 5)
file_features = "./features.txt"
features <- read.csv(file_features, head=FALSE, sep=" ")
features <- read.csv(file_features, head=FALSE, sep="")
source("functions.R")
features_mean_and_std <- extract_mean_and_std(features)
columns_with_mean_and_sts <- features_mean_and_std[[1]]
x_data_mean_and_std <- x_data[, columns_with_mean_and_sts]
head(x_data_mean_and_std, 5)