library(tidyverse)
df <- read_csv("Data/Micro09.csv") # 第9回の実習用データ
plot(x = df$PPP_per_capita, y = df$HDI_2018, pch = 19,
col = ifelse(df$OECD == 1, "red", "blue"),
xlab = "一人当たり購買力平価GDP (USD)", ylab = "人間開発指数")
legend("bottomright", pch = 19,
legend = c("OECD加盟国", "OECD非加盟国"),
col = c("red", "blue"))