# Variables¶

Let's go over how to assign variables in R.

You can use the <- character to assign a variable, note how it kind of looks like an arrow pointing from the object to the variable name.

In [1]:

    # Use hashtags for comments
    variable.name <- 100

In [2]:

    # Let's see the variable!
    variable.name

Out[2]:
100

## Working with variables¶

We can use variables together and work with them, for example:

In [3]:

    bank.account <- 100

In [5]:

    deposit <- 10

In [6]:

    bank.account <- bank.account + deposit

In [7]:

    bank.account

Out[7]:
110

That's all for now, let's go learn about the basic data types!