Psst! Check what courses we have in our offer, and get them all here to save $727. Act fast–this deal is available only 3/14–3/21.
Introduction
Text values
Variables
11. Type of a variable
Functions
Summary

Instruction

Nicely done! Let's practice creating more variables. Variables in R can hold numeric values (like height from the previous exercise) or text values. For example, the following line of code stores the string "Houston", Tanya's hometown, in a variable named city:

city <- "Houston"

Don't forget to place your string in quotes!

Exercise

Assign the string "Amsterdam" to a variable called hometown. This is the city in which John was born.