Practice Set: Tidyr

Get Out, Again

Like last time, someone else has already made some great tutorials, so please do those. Please complete the two lessons linked in the “You Try” boxes below.

  1. The first one introduces the concept of “tidy data” and will focus on going from long to wide format and vice versa.

This tutorial will use the functions spread() and gather(). These are from an older version of R! They recently renamed these functions to pivot_wider() and pivot_longer. They do the same things and the concepts are the same. But the function names and argument names have changed.

  1. The second one focuses on separating and uniting columns.

You try! Complete the following tutorials:

  1. Reshape Date
  2. Separate and Unite Columns

If you think you will be taking multiple data.frames or data sets and combining them into one larger data.frame, then I suggest this additional tutorial on joining data sets. It’s not required, but if this is something you’ll be doing a lot of, I suggest getting some practice doing it!

You’re doing great!

We all go in and out of productivity. It’s totally fine! Just be kind to yourself. And if you need to take a break, take one!