Welcome to SO. You receive an error message due to an update in ggplot2 ; the tutorial you are looking at was probably from an older version. You will see this in many places on the Internet.
For reference: the purpose of the exercise, the exact (or minimal working example) code and the output is usually published on this forum, and the efforts made at the stage where they got stuck are discussed. This helps other members give a more consistent answer.
source share