Introduction

Instruction

Like any other programming language, R lets us work with variables. These are names assigned to values and objects. To assign values to a variable, we use the assignment operator, <-. So if we wanted to create a variable named price that stores the value 3.14, we would write:

price <- 3.14

Exercise

Create a variable named tip that equals 2.718.

Stuck? Here's a hint!

Simply type:

tip <- 2.718