R

RStudio

Create new folder for scripts

Basic expressions

2 + 5
4 * 2 / 3
2 + 5
4 * 2 / 3

Variables

weight <- 26
double_weight <- weight * 2
weight
weight * 2
weight
weight <- 22
weight

Assignments format

# Exercise 1

# 1.1
2 + 2

# 1.2
2 - 8

# Problem 2

width = 2
height = 3
length = 1.5
volume = width * height * length
volume

Create assignment script, put in new folder

Do Exercise 1 - Basic Expressions

Do Exercise 2 - Basic Variables

Functions

abs(-2)
round(3.14159, 2)
pi_approx <- round(3.14159, 2)
pi_approx

Do Exercise 4 - Built-in Functions