title: how to get a stacked bar chart for a dummy variable
body: <p>my column in a dataset look like this:</p>
  
  <pre><code>teacher student  
   y        n  
   y        n  
   y        y  
   y        n  
   y        n  
   n        n  
   n        n   
   n        y  
   y        y  
   n        y  
   y        n  
  </code></pre>
  
  <p>I used    </p>
  
  <pre><code>barchart(data$teacher) 
  </code></pre>
  
  <p>for a graph for teacher, which shows the frequency of y and n in two separate bars, but now I want to show y and n stacked for both variables, so one bar each variable. I tried many things like <code>chart.StackedBar</code> but they all didn't work. Thanks for any help! </p>