title: Stacked bar plot in R with ratio line overplot
body: <p>I have data with one observation per row: </p>
  
  <pre><code>rm(list = ls(all = TRUE))
  mydf &lt;- data.frame(kind = sample(c("good", "bad"), 100, replace = TRUE), var1 = sample(c("yes", "no", "yes"), 100, replace = TRUE), var2 = sample(c("yes", "no"), 100, replace = TRUE), var3 = sample(c( "yes", "no"), 100, replace = TRUE), var4 = sample(c( "yes", "no", "yes", "no", "NA"), 100, replace = TRUE), var5 = sample(c( "yes", "no", "yes", "no", "NA"), 100, replace = TRUE), var6 = sample(c( "yes", "no", "yes", "no", "NA"), 100, replace = TRUE))
  </code></pre>
  
  <p>I need to: make a stacked bar chart with side-by-side bar pairs, one bar for each kind (good vs bad), showing the count of how many of each kind have 0 "yes" vars, how many have 1 "yes" var, etc., up to "yes" for all 6 vars. Y-axis = count, X-axis = the seven categories (0 yes vars, 1 yes var, etc). Each bar should be a stacked bar color-coded showing the contribution of each var to the total height of the bar. NAs are treated as "no". Also, overplot line showing the ratio of count(good)/count(bad) for each of the seven X-axis categories</p>