Exercise

Plot shares for chocolate bars

A picture will help bring those share predictions to life and make it easy for people to understand. Let's make a bar plot of the shares.

Instructions

100 XP
  • I've written the first line of code that computes the shares and saves them to shares.
  • You should fill in the missing inputs to barplot(). The first input should be the shares, which are stored in shares$share.
  • The second input should be the names of the different types of chocolate, which we can get from the chocolate data levels(chocolate$Type)