Coding basics

R as a calculator

1 / 200 * 30
## [1] 0.15
(59 + 73 + 2) / 3
## [1] 44.66667

assignment symbol

x <- 3 * 4

What’s in a name?

this_is_a_number <- 10
r_rocks <- TRUE

Calling functions

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

Use of TAB

seq()
## [1] 1

continuation character, +

y <- "test"

Printing to screen

print(this_is_a_number)
## [1] 10