別讓我從頭說起
tidyselect 套件中的輔助函式可以幫你挑選部分欄位。在這個練習中,你會使用 tidyselect 的 starts_with() 搭配 select(),從 imf_data 中選出一些欄位。
gov_revenue_as_perc_gdp 和 gov_net_debt_as_perc_gdp 這兩個欄位分別代表政府收入,以及政府總債務減資產,兩者單位皆為占國內生產毛額(GDP)的百分比。
本練習屬於課程
使用 dplyr 進行程式設計
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Choose columns starting with "gov"
imf_data %>%
select(___(___))