Question: Separate a column To create the week_ratings data, we first selected all the columns in ratings2 that contain data about the number of 7-day viewers

Separate a column

To create the week_ratings data, we first selected all the columns in ratings2 that contain data about the number of 7-day viewers in millions for each series, then we gathered those 10 columns into two columns.

In this exercise, you'll use the tidyr, dplyr, and readr packages (all are loaded) to tidy and plot the week_ratings data so we can read the x-axis, which labels each episode!

Instructions 1/3

  • Add a line after the %>% in your code from the last set of gathering exercises to separate the existing column named episode into a new column also called episode.
  • Drop the extra part that always says "7day".
  • Print to view the result.
  • Separate a column To create the week_ratings data, we first selected all

What code goes under # Edit to separate key column and drop extra

and # Print to view ? Code must be correctly typed for system to read it

Exercise -0. Light Mo script.R 1 2 3 4 5 6 7 8 week_ratings >% in your code from the last set of gathering exercises to separate the existing column named episode into a new column also called episode Drop the extra part that always says "day". Print to view the result. R Console Slides na.r = TRUE) *% separate(episode, into - "episode", extra = "drop") %>% # Print to vies week_ratings

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!