Coding basics

R as a calculator

400 / 120 * 2
## [1] 6.666667
x <- 400 / 120 * 2
x
## [1] 6.666667

assignment symbol

What’s in a name?

i_use_snake_case otherPeopleUseCamelCase some.people.use.periods And_aFew.People_RENOUNCEconvention

Calling functions

Use of TAB

seq(from = 1, to = 10, by = .5)
##  [1]  1.0  1.5  2.0  2.5  3.0  3.5  4.0  4.5  5.0  5.5  6.0  6.5  7.0  7.5  8.0
## [16]  8.5  9.0  9.5 10.0

continuation character, +

seq(from = 1, to = 10)
    

Printing to screen

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