Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Tidyr
Changing data format
Summary
16. Exercise 5

Instruction

This dataset is in wide format. Let's change it to long format, and then we'll be done.

Exercise

Gather columns from 2001 to 2007 using gather().

Use year as the key and sale as the value.

Stuck? Here's a hint!

Type:

gather(car_sale, `2001`:`2007`, key = "year", value = "sale")