Good day everyone,
Please i need assistance with the code below.
ggplot(mtcars, aes(x = mpg))+
geom_histogram((bins = 10)+
labs(x = "Miles/(US) gallon",
y = "Count",
title = "Distribution of Miles/Gallon")+
geom_vline(aes(xintercept = 19.2),
color = "red") +
annotate(geom = "text",
label = "Median = 19.2",
x = 21,
y = 7,
hjust = 0,
color = "red"))
Here's the error message i got after running the code:
Error in (bins = 10) + labs(x = "Miles/(US) gallon", y = "Count", title = "Distribution of Miles/Gallon") :
non-numeric argument to binary operator