Explorative Datenanalyse in R
Andrew Bray
Assistant Professor, Reed College



Analysiere die zwei Komponenten getrennt
Zu einer zweistufigen kategorialen Variable zusammenfassen

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")

Explorative Datenanalyse in R