title: Plotting a ggplot() when having the confidence interval upper and lower values
body: <p>Please bear with me as I'm quite new to R and specially to ggplot(). This is the second time I'm asking something regarding the use of this function. I would like to create a plot which resembles the one below:</p>
  <p><a href="https://i.stack.imgur.com/LVYhl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LVYhl.jpg" alt="enter image description here" /></a></p>
  <p>I've been using a script looking like this for such purpose:</p>
  <pre><code>
  df &lt;- tibble::tribble(~Proportion, ~Error, ~Time,
                        0.351 , 0.154, &quot;Day&quot;,
                        0.223 , 0.157 , &quot;Night&quot;)
  
  dfnew &lt;- df %&gt;% 
    mutate(ymin = Proportion - Error,
           ymax = Proportion + Error)
  
  p &lt;-   ggplot(data = dfnew, aes(x = Time, y = Proportion)) +
    geom_point() + geom_line(aes(group = 1), color=&quot;lightblue&quot;,size=2) + 
    geom_errorbar(aes(x = Time, ymin = ymin, ymax = ymax),color=&quot;purple&quot;,width=0.1,size=1)
  
  
  p&lt;-p+theme(axis.text=element_text(size=12),
          axis.title=element_text(size=14))
  </code></pre>
  <p>However, I now face the problem of having data for confidence intervals that includes the upper and lower values, instead of an error value as I have on the script above. My data looks like this:</p>
  <pre><code>&gt; df
  # A tibble: 2 x 4
    Average Lower Upper Time 
      &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt;
  1   0.351 0.284 0.421 Day  
  2   0.223 0.178 0.275 Night
  </code></pre>
  <p>Any idea on how I can implement this two <code>Lower</code> and <code>Upper</code> values into error bars?</p>
  <p>Any input is appreciated!</p>