title: Stacked Bar Graph In R
body: <p>So I'm trying to make a stacked bar plot. This is all the data that needs to be in the plot. I am wanting a-e to be next to f-j. I am also trying to get the y-axis to be reasonable. For some reason it is putting numbers instead of a limit. I am probably doing it completely wrong. I've looke</p>
  
  <pre><code>data&lt;- rbind(c(4655, 4212, 3838, 3583, 3124, 3078, 1411, 2589, 2524, 2429),
           c(2826, 2589, 2557, 2713, 2497, 1, 2, 66, 1757, 1822))
  
  a &lt;- cbind(data[, 1], 1, c("50-60", "40-49"))
  b &lt;- cbind(data[, 2], 2, c("50-60", "40-49"))
  c &lt;- cbind(data[, 3], 3, c("50-60", "40-49"))
  d &lt;- cbind(data[, 4], 4, c("50-60", "40-49"))
  e &lt;- cbind(data[, 5], 5, c("50-60", "40-49"))
  f &lt;- cbind(data[, 6], 1, c("50-60", "40-49"))
  g &lt;- cbind(data[, 7], 2, c("50-60", "40-49"))
  h &lt;- cbind(data[, 8], 3, c("50-60", "40-49")) 
  i &lt;- cbind(data[, 9], 4, c("50-60", "40-49"))
  j &lt;- cbind(data[, 10], 5, c("50-60", "40-49"))
  
  data  &lt;- as.data.frame(rbind(a, b, c, d, e, f, g, h, i, j))
  colnames(data) &lt;-c("Number", "Year", "Age")
  data$Year      &lt;- factor(data$Year, labels = c("FY13", 
                           "FY14","FY15","FY16","FY17"))
  
  library(ggplot2)
  
  ggplot(data = data, aes(x = data$Year, y = Number, fill = Age)) + 
         geom_bar(stat = "identity")
  </code></pre>
  
  <p>I am probably doing it completely wrong. I've looked and looked, but cannot find something else to help me. </p>