pie() function. In this example (Figure 13.31), we’ll use the survey data set from the MASS library:
pie() an object of class table. We could have instead given it a named vector, or a vector of values and a vector of labels like this, with the same result:
The lowly pie chart is the subject of frequent abuse from data visualization experts. If you’re thinking of using a pie chart, consider whether a bar graph (or stacked bar graph) would convey the information more effectively. Despite their faults, pie charts do have one important virtue: everyone knows how to read them.