Primers: Data Visualization Basics

Hi Posit,
I love the Primers as a learning tool for students. However,

ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy))

creates a scatterplot showing a negative relationship.

cor(mpg$displ, mpg$hwy)
[1] -0.76602

So to say, "Great! In other words, there is a positive relationship between engine size and fuel efficiency"
in incorrect. Please fix

Try ?mpg

It says
hmy == highway miles per gallon

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.