title: How can I pass a vector of values to geom_vline when working with facets?
body: <p>I have a data frame that has several columns, with each column corresponding to a different id. I have created a density plot for each column using the following code:</p>
  
  <pre><code> ggplot(melt(df),aes(x=value)) + geom_density() + 
   facet_wrap_paginate(~variable, nrow = 3, ncol = 2, page = 1, scales = 
   "free") 
  </code></pre>
  
  <p>What I want to do is add a vertical line to each plot with the vertical line corresponding to a specific value in a vector. For example, I want to plot a vertical line with a x-intercept corresponding to the first value in the vector for the first facet/plot and so on for the second, third... </p>
  
  <p>I've tried: </p>
  
  <pre><code> ggplot(melt(df),aes(x=value)) + geom_density() + 
   geom_vline(aes(yintercept = vector))
   facet_wrap_paginate(~variable, nrow = 3, ncol = 2, page = 1, scales = 
   "free") 
  </code></pre>
  
  <p>But this doesn't work. Any help would be appreciated! Thank you!</p>
  
  <p>Here's a sample of the data:</p>
  
  <pre><code>structure(list(P1 = c(2.020089156, 1.146085334, -1.419562976, 
  1.291621209, -1.288234235, 0.596079171, -0.114523205, 0.318296715, 
  -0.710111131, 1.234172157, 1.638215841, 0.074228733, -0.418031048, 
  -0.873318667, -1.099210823, 1.055800864, -0.258843912, -1.299183683, 
  1.679751351, -0.332529691), P2 = c(-0.200656757, -0.905949115, 
  -0.123085761, 1.564677289, -0.289882157, -0.162469608, 1.208284733, 
  0.079959849, -0.212177202, 1.375590172, 0.872137796, -0.253766902, 
  -0.861501631, -0.370784258, -0.463778362, 0.358558145, 1.017652625, 
  -0.753227309, 3.385005831, -0.421509939), P3 = c(-0.733666761, 
  -0.107249708, 1.051832738, -0.308113556, -0.08050586, 0.503093678, 
  0.293885202, 0.765470656, -0.250293951, 0.173549289, 1.611834764, 
  0.380911004, -0.843674488, 0.660706821, -0.189601606, 0.502569289, 
  -0.580795921, -0.412284603, 1.629367602, -0.397373712), P4 = c(0.77604806, 
  -0.06368464, 0.16445295, 0.45655382, -1.29685072, -0.54675214, 
  -0.23219627, -0.47352554, -0.04939622, -0.75526638, 0.87428248, 
  -1.71997627, 0.06243265, 0.95946773, 1.04786879, 0.53349193, 
  -0.6434623, -0.81765584, -0.35355488, -1.74251801), P5 = c(-0.833394003, 
  1.225244117, -0.70948569, -0.004266946, -0.272899255, 0.654305811, 
  -0.274527936, 0.106797649, 0.11825556, 0.670149731, 0.825460151, 
  0.089353621, -0.22925347, 0.796101039, 1.035388522, 0.815188034, 
  -0.955502196, -0.374220339, -0.491128182, 0.965498118), P6 = c(-0.52589579, 
  1.02997904, 1.16576282, 0.46506523, -0.2265231, -0.16677585, 
  0.12376603, 1.36208941, -1.67231104, 1.02273936, 0.42407352, 
  0.67183367, 0.04955931, -0.41284541, -0.50013924, 1.05752563, 
  -0.29500172, -0.53794867, 2.27617856, -0.56288976)), row.names = c(NA, 
  20L), class = "data.frame")
  </code></pre>
  
  <p>The vector of values I want to add would be:</p>
  
  <pre><code>refvals &lt;- c(0.23, -0.1, 0.5, 0.88, -0.31, -0.38)
  </code></pre>