We can add any of these to a plot and override existing
For datasets, use %+%
dataset1 <- data.frame(id = rep(letters[1:3], each = 100),
Value = c(rnorm(100, mean = 1),
rnorm(100, mean = 2),
rnorm(100, mean = 3)))
dataset2 <- data.frame(id = rep(letters[1:3], each = 100),
Value = c(rpois(100, lambda = 1),
rpois(100, lambda = 2),
rpois(100, lambda = 3)))
p1 <- ggplot(dataset1, aes(x = Value, col = id))+
geom_density()+
theme_minimal()
p1