Tidyr
Changing data format
9. Check how the data looks
Summary

Instruction

It's simple, isn't it? Indeed, gather() is a very useful command, and it's one that is frequently used when working with a new dataset.

The data is now in what we call long format – every column is a variable, and all the rows are observations. Why is this so important? Because when we use tidyverse functions (and other R functions as well), they work better when the data is in long format.

Let's have a look at our newly formatted data.

Exercise

List the first 25 rows of unemployment2 using head().

Stuck? Here's a hint!

Type:

head(unemployment2, 25)