R natively offers the
pie() function that
builds pie charts. The input is just a numeric variable, each value
providing the value of a group of the piechart.
Important note: pie chart are widely known as a bad way to visualize information. Check this post for reasons and alternatives.
Provide a vector of labels to the
labels argument to
add names to piechart groups:
Decrease the value of the
edges argument to get angles
around your piechart.
density arguments adds stripes.
You can control the angle of those stripes with
Change group color with
col, and border color with
RcolorBrewer package is used to build a nice