開始使用免費開始

使用標籤連接問題與答案

為了更深入了解 questionsanswers 資料表,你會需要使用 question_tags 資料表,來掌握每個提問與每個回答所對應的標籤。你可以對 questions 資料表與 answers 資料表各做一次 inner join,將這些資料表合併起來。

本練習屬於課程

使用 dplyr 進行資料表連接

檢視課程

練習說明

  • 先使用兩次 inner join,將 question_tagstags 資料表合併到 questions 資料表。
  • 接著,再使用兩次 inner join,將 question_tagstags 資料表合併到 answers 資料表。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# 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 %>%
  ___ %>%
  ___
編輯並執行程式碼