LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Joining Data with dplyr

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Join the questions and question_tags tables
questions %>%
  ___
Code bearbeiten und ausführen