I’ve had a little look at the ‘ggpmisc’ package in R and the vignette here. So I have some comments on the functions in them: The first two functions concern fitting a line of best fit (stat_poly_line ...
The ggplot2 package is based on the principle that all plots consist of a few basic components: data, a coordinate system and a visual representation of the data. In ggplot2, you built plots ...
geom_smooth(mapping = NULL, data = NULL, stat = "smooth", position = "identity", ..., method = "auto", formula = y ~ x, se = TRUE, na.rm = FALSE, show.legend = NA ...
Note the column name, mpg, is unquoted. That feature hasn’t been handy, though, if you want to write your own R functions using the tidyverse. That’s because base R functions usually need quoted ...