title: Create a histogram for age distribution that has different colors for sex
body: <p>I am trying to visualize demographic data in a histogram.</p>
  
  <p>I would like to have a histogram that has:
  -age groups (20-25, 25-30,...) 
  -and for each age group two bars (female, male) with different colours (red, blue). </p>
  
  <p>I tried many things, like creating separate dataframes for sex:</p>
  
  <pre><code>hist(dem.data.female$age,col="red"...)
  
  hist(dem.data.male$age, col= "blue", add= T....)
  </code></pre>
  
  <p>I received a histogram but the bars overlayed each other... I also tried installing the easy.ggplot2 package but my R program seems not to have it. </p>
  
  <p><a href="https://i.stack.imgur.com/1ut3j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ut3j.png" alt="enter image description here"></a></p>