-
Notifications
You must be signed in to change notification settings - Fork 3
/
.Rhistory
61 lines (61 loc) · 1.2 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
source('~/projects/dynamic/data/logistic_regression.r')
print("Hello")
# increment function
do_something <- function(n) {
return(n+1)
}
x <- 1
y <- do_something(x)
print(y)
lapply(pompom, do_something)
# declare vector of numbers
pompom <- c(1,2,3,4,5)
lapply(pompom, do_something)
print(pompom)
?lapply
?c
new_pom = c()
for (elem in pompom) {
new_pom <- c(elem + 1)
}
print(new_pom)
new_pom = c()
for (elem in pompom) {
append(new_pom, elem + 1)
}
print(new_pom)
for (elem in pompom) {
new_pom <- c(new_pom, elem + 1)
}
print(new_pom)
new_pom = c()
for (i in 1:length(pompom)) {
new_pom[i] <- elem + 1
}
print(new_pom)
for (i in 1:length(pompom)) {
new_pom[i] <- pompom[i] + 1
}
print(new_pom)
1:5
1:6:2
length("abc")
length(c(1,2,3,45))
new_pom[i] <- pompom[i] + 1
for (i in 1:length(pompom)) {
new_pom[i] <- pompom[i] + 1
}
print(new_pom)
lapply(pompom, function(x) {x+1})
new_pom <- lapply(pompom, function(x) {x+1})
print(new_pom)
x <- lapply(pompom, function(x) {x+1})
print(x)
x
x
x <- lapply(pompom, function(x) {return(x+1)})
x
# read full dataset
training.data.raw <- read.csv('mock_full.csv', header=T, na.strings=c(""))
# read full dataset
training.data.raw <- read.csv('mock_full.csv', header=T, na.strings=c(""))