title: ggplot2: add regression equations and R2 and adjust their positions on plot
body: <p>Using <code>df</code> and the code below  </p>
  
  <pre><code>library(dplyr) 
  library(ggplot2)
  library(devtools)
  
  df &lt;- diamonds %&gt;%
    dplyr::filter(cut%in%c("Fair","Ideal")) %&gt;%
    dplyr::filter(clarity%in%c("I1" ,  "SI2" , "SI1" , "VS2" , "VS1",  "VVS2")) %&gt;%
    dplyr::mutate(new_price = ifelse(cut == "Fair", 
                                     price* 0.5, 
                                     price * 1.1))
  
  ggplot(df, aes(x= new_price, y= carat, color = cut))+
    geom_point(alpha = 0.3)+
    facet_wrap(~clarity, scales = "free_y")+
    geom_smooth(method = "lm", se = F)
  </code></pre>
  
  <p>I got this plot</p>
  
  <p><a href="https://i.stack.imgur.com/g3Lh5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/g3Lh5.png" alt="enter image description here"></a></p>
  
  <p>Thanks to @kdauria's answer to <a href="https://stackoverflow.com/questions/19699858/ggplot-adding-regression-line-equation-and-r2-with-facet">this question</a>, I added regression equations and R2 to the plot as below</p>
  
  <pre><code>source_gist("524eade46135f6348140")
  ggplot(df, aes(x= new_price, y= carat, color = cut))+
    stat_smooth_func(geom="text",method="lm",hjust=0,parse=TRUE)+
    geom_point(alpha = 0.3)+
    facet_wrap(~clarity, scales = "free_y")+
    geom_smooth(method = "lm", se = F)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/GolNn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GolNn.png" alt="enter image description here"></a></p>
  
  <p>Now, I want to adjust the position of the regression equations and R2 to be at a specific place in each of the facets (for example at the bottom right in each facet "e.g. 0.2 y and 0.8 x). </p>
  
  <p>I tried to adjust the position through <code>vjust</code> and <code>hjust</code> but it didn't work.</p>
  
  <p>Any suggestions would be highly appreciated. </p>