연습문제 해답

연습문제 해답들은 R마크다운 (RMarkdown) 으로 작성되었습니다.

원본 파일들은 다음 리포에서 확인할 수 있습니다. https://github.com/jaimyoung/ipds-kr/tree/master/solutions

보너스: 본문 그림 4-11, 12

suppressMessages(library(tidyverse))
library(gapminder)
suppressMessages(library(plotly))

g1 <- gapminder %>% filter(year==2002) %>%
  ggplot(aes(gdpPercap, lifeExp, text=country)) +
  geom_point(aes(size=pop, col=continent)) + scale_x_log10() +
  ggtitle("Gapminder data for 2007")
suppressMessages(ggplotly(g1))
g2 <- gapminder %>%
  ggplot(aes(year, lifeExp, group=country)) +
  geom_line() +
  facet_wrap(~ continent)
suppressMessages(ggplotly(g2))