title: How to create a bar plot and show average Y values
body: <p>I want to create a bar plot based on the following data:</p>
  
  <pre><code>Station    Delay
  A          5
  B          6
  A          4
  A          3
  B          8
  </code></pre>
  
  <p>X axis should contain stations "A" and "B", while bars (Y axis) should show average delay per a station.</p>
  
  <p>I tried this, but it does not give a correct result:</p>
  
  <pre><code>barplot(c(data$Station, data$Delay), 
          main="BARPLOT", xlab="Stations", ylab="Delays", 
          names.arg=data$Station)  
  </code></pre>