I am trying to use a QQ plot to determine if my data are normally distributed. I am using the mtcars
dataset for practice. When making a QQ plot, I keep getting the error below:
Warning messages:
1: The following aesthetics were dropped during statistical transformation: sample
ℹ This can happen when ggplot fails to infer the correct grouping structure in the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical variable into a factor?
2: The following aesthetics were dropped during statistical transformation: sample
ℹ This can happen when ggplot fails to infer the correct grouping structure in the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical variable into a factor?
The plot itself prints out, actually looks totally reasonable, and matches my output in Excel. However, I don't want to have this error message keep popping up as it's a bit annoying. I also worry I am missing something that could be important. Weirdly, when I run the examples listed on the help tab for ggqqplot
, I get the same error. Does anyone know what might be going on? Here is my code for reference:
library("ggpubr")
ggqqplot(mtcars,x="mpg")