IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Joining Data with dplyr

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Join the questions and question_tags tables
questions %>%
  ___
Modifica ed esegui il codice