Aan de slagGa gratis aan de slag

Left joining questions and tags

Three of the Stack Overflow survey datasets are questions, question_tags, and tags:

  • questions: an ID and the score, or how many times the question has been upvoted; the data only includes R-based questions
  • question_tags: a tag ID for each question and the question's id
  • tags: a tag id and the tag's name, which can be used to identify the subject of each question, such as ggplot2 or dplyr

In this exercise, we'll be stitching together these datasets and replacing NAs in important fields.

Note that we'll be using left_joins in this exercise to ensure we keep all questions, even those without a corresponding tag. However, since we know the questions data is all R data, we'll want to manually tag these as R questions with replace_na.

Deze oefening maakt deel uit van de cursus

Joining Data with dplyr

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Join the questions and question_tags tables
questions %>%
  ___
Code bewerken en uitvoeren