Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Getting started with tibbles
Creating tibbles
Subsetting
9. Get a tibble's column names
Summary

Instruction

Now, let's learn how to subset a column, like we do with a data frame.

First, let's get all the column names in our data set. We do this using the colnames() function. If our tibble was named employees, the command would look like this:

colnames(employees)

Exercise

Get column names from the orders tibble using colnames().

Stuck? Here's a hint!

Type:

colnames(orders)