In R, type the sorted horizontal bar chart of order counts by province that replaces a pie of province share.
In R, type the sorted horizontal bar chart of order counts by province that replaces a pie of province share.
Answer
barplot(sort(table(orders$prov)), horiz = TRUE)
table() gives the heights, sort() orders them, horiz = TRUE lays the bars sideways so every province name reads in full. R draws the first bar at the bottom, so ascending order puts ON — the largest — on top.