开始使用免费开始使用

为问题与答案添加标签并进行连接

为了更深入了解 questionsanswers 两张表,您需要使用 question_tags 表来理解每个提问及其对应答案所关联的标签。您可以在 questions 表和 answers 表上分别进行两次 inner join,将这些表合并在一起。

本练习是课程的一部分

使用 dplyr 进行数据表连接

查看课程

练习说明

  • 使用两次 inner join,将 question_tagstagsquestions 表合并。
  • 接着,再使用两次 inner join,将 question_tagstagsanswers 表合并。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Inner join the question_tags and tags tables with the questions table
questions %>%
  inner_join(question_tags, by = ___) %>%
  inner_join(tags, by = ___)

# Inner join the question_tags and tags tables with the answers table
answers %>%
  ___ %>%
  ___
编辑并运行代码