Coding Basics

Mathematical calculations:

1/200 * 30
(342+34+4)/5
cos(2/sqrt(2))

Creating new objects:

x <- 1 + 2

All R statements where you create objects, assignment statements, have the same form (use snake_case when naming objects):

object_name <- value

Calling Functions

Built-in functions in R are called like this:

function_name(arg1=val1, arg2-ws2)

For example, if we want to call upon the seq() function to generate a sequence of numbers from 1 to 10:

seq(1,10)