~/ learn/ afm-112/ cards/ The "which display is inappropriate" item
1 of 6

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.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/2270a971-773d-43fd-9d95-c1c72fdac053/flashcard utf-8 LF