geom_lm_sample.Rd
A geom that shows the linear model of a sample of observations
geom_lm_sample( mapping = NULL, data = NULL, position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ... )
mapping | aesthetic mappings |
---|---|
data | global data |
position | ggplot2 positions |
na.rm | logical remove na |
show.legend | logical, should legend be displayed for layer |
inherit.aes | logical, should global aes be used for this layer |
... | all the geom_point arguments |
a geom layer
my_seed <- sample(1:100, 1) library(ggplot2) ggplot(data = cars) + aes(x = speed, y = dist) + geom_point() + geom_smooth(method = lm, se = FALSE) + geom_point_sample(color = "red", seed = my_seed) + geom_lm_sample(color = "red", seed = my_seed)#>#>#>