Getting started with tibbles
Creating tibbles
Subsetting
13. Extract columns by [
Summary

Instruction

Ok, but what about the [ operator? What happens when we use it to extract a column? Let's try it, assigning the results to a new variable. In our employees example, this would look like

departments <- employees[,"department"]

supposing we were assigning the results to the departments variable.

Exercise

Extract the product column from orders using the [ operator. Assign the results to the products variable.

Stuck? Here's a hint!

Type:

products <- orders[,"product"]