Coding basics

R as a calculator

5420/12
## [1] 451.6667

assignment symbol

What’s in a name?

# i_like_your_tricycle
i_like_your_tricycle <- 5420/12
i_like_your_tricycle
## [1] 451.6667

Calling functions

Use of TAB

seq(from = 10, to = 80)
##  [1] 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
## [26] 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
## [51] 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
seq(from = 10, to = 80, by = 10)
## [1] 10 20 30 40 50 60 70 80

continuation character,

seq.int(from = 5, to = 25, by = 5)
## [1]  5 10 15 20 25

Printing to screen

y <- seq(from = 5, to = 25, by = 5)
y
## [1]  5 10 15 20 25