Remind students to install R and RStudio.

Have students open RStudio and check to see if console “sees” R.

R

RStudio

Basic expressions

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

Types

str(2)
str('hello world')

Variables

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

Assignments format

# Problem 1

# 1.1
2 + 2

# 1.2
2 - 8

# Problem 2

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

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