การวิเคราะห์เชิงสำรวจข้อมูลใน R
Andrew Bray
Assistant Professor, Reed College



วิเคราะห์สององค์ประกอบแยกกัน
ยุบเป็นตัวแปรเชิงกลุ่มสองระดับ

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

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

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

การวิเคราะห์เชิงสำรวจข้อมูลใน R