title: Creating barplot from multiple dataframe columns based on count in each category R
body: <p>I have the following example of a data.frame:</p>
  
  <pre><code>df &lt;- data.frame(c("a","c","d","e","e","a","a","b","b","a","d","a"),
                   c("b","b","d","e","e","a","a","b","b",NA,"d","e"),
                   c("c","c","d","c","e","b","a","d","d",NA,"c","e"),
                   c("d","d","b","e","e","a","a",NA,"b",NA,NA,"b"))
  colnames(df) &lt;- c("1st","2nd","3rd","4th")
  </code></pre>
  
  <p>What I need is a barplot with ggplot2, where I would like to show the count in each category of the answer as per chosen columns in the dataframe (that would come in different colours). Something along these lines as done in excel (albeit frequencies on y do not match this data.frame). Would also like to set category for NA OR show option without NA's. Could not figure it out. Thanks for your time.</p>
  
  <p>ALSO - what is important is that each time (for each column) each category (a,b,c,d or e) will have the same colour.</p>
  
  <p><a href="https://i.stack.imgur.com/WsArR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WsArR.jpg" alt="enter image description here"></a></p>