title: How to add custom quantile lines to a scatter plot?
body: <p>there! I am new to R, and I am currently studying thorough an online course.</p>
  
  <p>In this exercises, I am plotting a scatter plot of "age" against "friend_count" using a mock social network data set "pf" using ggplot2. I was able to plot the scatter graph and the mean line without a problem using the following code:</p>
  
  <pre><code>ggplot(aes(x = age, y = friend_count), data = pf) +
    geom_point(color = "orange") +
    geom_line(stat = 'summary', fun.y = mean)
  </code></pre>
  
  <p>Now I am trying to plot the 10% quantile line as well. The course suggests the following code:</p>
  
  <pre><code>+ geom_line(stat = 'summary', fun.y = quantile, probs = 0.1)
  </code></pre>
  
  <p>However, perhaps because I am using a newer version this does not work, and I get the error "unknown parameter: probs"
  Having researched the quantile() function, I have tried the following:</p>
  
  <pre><code>+ geom_line(stat = 'summary', fun.y = quantile(y, probs = 0.1))
  </code></pre>
  
  <p>and</p>
  
  <pre><code>+ geom_line(stat = 'summary', fun.y = quantile(friend_count, probs = 0.1))
  </code></pre>
  
  <p>which say "object y not found" and "object friend_count not found" respectively. Same happened when I tried pf$friend_count.</p>
  
  <pre><code>+ geom_line(stat = 'summary', fun.y = quantile)
  </code></pre>
  
  <p>does not work either. I have even tried defining a function "quantile", but wasn't really able to.</p>
  
  <p>I am sure there is an easy way to do this... Can you help?</p>