使用 data.table 語法進行 inner join
在上一個練習中,你將 population 右連接到 capitals。結果包含 population 的所有列,並且有一些 NA。在本練習中,你會改用 inner join,只保留同時在兩個資料表中出現的列。
本練習屬於課程
R 的 data.table 資料合併
練習說明
使用 data.table 語法,將 population 與 capitals 做 inner join。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Inner join with the data.table syntax
___[population, ___, ___]