title: Error: Found object is not a stat
body: <p>I'm using the following code:</p>
  
  <pre><code>library (ggplot2)
  df=data.frame(score=c(1,3,5,9,7,8,4,1,2,6,1,6,2,1,3,1,3,5,8,4),
                age=c(2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3))  
  
  ggplot(data=df,aes(x=age,y=score))+
       geom_point(position=position_jitter(width=.1),aes(color=age))+
       geom_line(stat = "hline", yintercept = "mean",aes(group=age))+
       stat_summary(geom = "line", fun.y="mean",aes(yend=..y..),width=.5)+
       stat_summary(fun.data="mean_cl_boot",geom="errorbar",width=.5)+
       theme_classic()
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>Error: Found object is not a stat.</p>
  </blockquote>
  
  <p>Does anyone know how to solve this problem? I used this before but now it's not working.I want to produce something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/lPAvw.jpg" alt="enter image description here"></p>
  
  <p>I would like to have the mean bar but I could only produce something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/p7elY.png" rel="nofollow noreferrer">enter image description here</a> </p>