Tidy Data Rule #2: Every Row is an Observation
This lesson is called Tidy Data Rule #2: Every Row is an Observation, part of the Going Deeper with R (RStudio) course. This lesson is called Tidy Data Rule #2: Every Row is an Observation, part of the Going Deeper with R (RStudio) course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Loading transcript...
View code shown in video
activities_survey |>
separate_longer_delim(cols = activities,
delim = ", ")
Your Turn
Run the following code to view the built-in gss_cat data frame.
library(tidyverse)
gss_cat |>
view()
Then, write code to count the number of unique responses in the partyid variable.
You’ll need to use the separate_longer_delim() and count() functions to do this.
Learn More
This lesson from the R for Social Scientists course materials covers separate_longer_delim().
Have any questions? Put them below and we will help you out!
Course Content
44 Lessons
You need to be signed-in to comment on this post. Login.