In this activity, we will go over how to identify and fix common coding errors. This demonstration will use the mtcars data set. In each of these code chunks, you will either need to add or alter code in order to get it running. Please take notes and treat this AE as a “common errors debugging sheet” to use in the future. There will only be one error per code chunk.
First, let’s make a quick exploratory plot to assess these data.