I am trying plot 50 simulated regression lines. I can do the plot in base R, but I'm struggling to do it with ggplot2
Simulated data:
library(tidyverse)
set.seed(5)
priors <- tibble(a = rnorm(n = 50, mean = 0, sd = 1),
bN = rnorm(n = 50, mean = 0, sd = 1))
Desired output using base R:
plot( NULL , xlim=c(-2,2) , ylim=c(-2,2) )
for(i in 1:50) curve(priors$a[i] + priors$bN[i]*x,
from = -2, to = 2, add = TRUE)
How can I do the same thing using ggplot2?

