Introduction

Instruction

There is also another way to retrieve a column from a data frame: using the dollar sign operator, $. To do this, we write the data frame’s name followed by the dollar sign operator and then the name of the column that we wish to retrieve, like this:

people$age

Exercise

Use the dollar sign operator to retrieve the price column from the cars data frame.

Stuck? Here's a hint!

Type:

cars$price