piechart | R Documentation |
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
pie
, rainbow_hcl
with(Duncan, piechart(type))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.