inst/examples/R/data/graphics/pie_chart/example_piechart.R

library("MASS") # for Boston Housing data
tab <- table(Boston$rad)
pie(tab)
#
library("ggplot2")
pie <- ggplot(Boston, aes(x = factor(1), 
                          fill = factor(rad))) 
pie + geom_bar(width = 1) + coord_polar(theta = "y")
sigbertklinke/shinyExample documentation built on May 26, 2019, 4:32 a.m.