Examples for 'GGally::ggally_count'


Display counts of observations

Aliases: ggally_count stat_ggally_count StatGGallyCount ggally_countDiag

Keywords: datasets hplot

### ** Examples

# Small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive

data(tips, package = "reshape")
p_(ggally_count(tips, mapping = ggplot2::aes(x = smoker, y = sex)))
plot of chunk example-GGally-ggally_count-1
p_(ggally_count(tips, mapping = ggplot2::aes(x = smoker, y = sex, fill = day)))
plot of chunk example-GGally-ggally_count-1
p_(ggally_count(
  as.data.frame(Titanic),
  mapping = ggplot2::aes(x = Class, y = Survived, weight = Freq)
))
plot of chunk example-GGally-ggally_count-1
p_(ggally_count(
  as.data.frame(Titanic),
  mapping = ggplot2::aes(x = Class, y = Survived, weight = Freq),
  x.width = 0.5
))
plot of chunk example-GGally-ggally_count-1
# Small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive

p_(ggally_countDiag(tips, mapping = ggplot2::aes(x = smoker)))
plot of chunk example-GGally-ggally_count-1
p_(ggally_countDiag(tips, mapping = ggplot2::aes(x = smoker, fill = sex)))
plot of chunk example-GGally-ggally_count-1

[Package GGally version 2.1.2 Index]