Draw a Piechart With Percents or Counts in the Labels
piechart
is a front-end to the standard R pie
function, with the
capability of adding percents or counts to the pie-segment labels.
piechart(x, scale = c("percent", "frequency", "none"), col = rainbow_hcl(nlevels(x)), ...)
x |
a factor or other discrete variable; the segments of the pie correspond to the
unique values (levels) of |
scale |
parenthetical numbers to add to the pie-segment labels; the default is |
col |
colors for the segments; the default is provided by the |
... |
further arguments to be passed to |
John Fox jfox@mcmaster.ca
with(Duncan, piechart(type))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.