-
Notifications
You must be signed in to change notification settings - Fork 0
/
lecture1.R
62 lines (47 loc) · 799 Bytes
/
lecture1.R
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
# STAT295
# Revision
1+1
a <- 1+1
a
1:100
vec <- 1:100
vec
class(vec)
typeof(vec)
# 1::100 typo
# we can use R as a calculator
1+5
3*5
100/5
# dice
1:6
mydice <- 1:6
mydice
# case sensitive
aaa <- 555
AAA <- 666
ls()
mydice - 1
mydice * mydice
#inner multiplication
mydice %*% mydice
mydice %o% mydice
dim(mydice) <- c(2,3)
mydice
dim(mydice) <- c(1, 2, 3)
mydice
# matrix
m <- matrix(mydice, nrow=2)
m
m <- matrix(mydice, nrow=2, byrow=TRUE)
m
# array
myarray <- array(C(1:12), dim=c(2, 2, 3))
myarray
now <- Sys.time()
now
install.packages(c("devtools","roxygen2","testthat","rmarkdown","pkgdown","purrr"))
usethis::use_git_config(user.name = "melisacepni",
user.email="melisa.cepni@metu.edu.tr")
usethis::create_github_token()
gitcreds::gitcreds_set()