第一次檢核

R 的探索式資料分析

Andrew Bray

Assistant Professor, Reed College

複習

ch4_2.003.png

R 的探索式資料分析

複習

ch4_2.004.png

R 的探索式資料分析

零膨脹對策

  • 分別分析兩個組成部分
  • 摺疊為二元類別變數

ch4_2.006.png

R 的探索式資料分析

零膨脹對策

  • 分別分析兩個組成部分

  • 摺疊為二元類別變數

ch4_2.007.png

R 的探索式資料分析

零膨脹對策

email %>%
  mutate(zero = exclaim_mess == 0) %>%
  ggplot(aes(x = zero)) +
  geom_bar() +
  facet_wrap(~spam)

ch4_2.009.png

R 的探索式資料分析

長條圖選項

email %>%
  mutate(zero = exclaim_mess == 0) %>%
  ggplot(aes(x = zero, fill = spam)) +
  geom_bar()

ch4_2.011.png

R 的探索式資料分析

長條圖選項

email %>%
  mutate(zero = exclaim_mess == 0) %>%
  ggplot(aes(x = zero, fill = spam)) +
  geom_bar(position = "fill")

ch4_2.012.png

R 的探索式資料分析

一起來練習吧!

R 的探索式資料分析

Preparing Video For Download...