Coding basics

x <- 3 * 4

x * 3
## [1] 36

R as a calculator

155 / 81
## [1] 1.91358
x <- 136

x * 152 / 8
## [1] 2584

assignment symbol

Josh_age <- 22

What’s in a name?

Josh_age
## [1] 22

Calling functions

Use of TAB

seq(1, 20)
##  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20

continuation character, +

seq(from = 1, to = 10)
##  [1]  1  2  3  4  5  6  7  8  9 10

Printing to screen

y <- seq(from = 1, to = 10)
y
##  [1]  1  2  3  4  5  6  7  8  9 10