title: Reformatting data frame to be able to plot bar charts with ggplot2
body: <p>The questions refers to reformatting a data frame (df) to cope with displaying three bar charts on the same diagram with ggplo2(). Thank you for each response!</p>
  
  <p>The data I have in df:</p>
  
  <pre><code>colA,    colB,    colC
  label1,  label1,  label2
  label3,  label1,  label3
  label4,  label4,  label2
  label5,  label4,  label5
  </code></pre>
  
  <p>With these data I can create bar charts for each column with the command below that presents the counts for each label in the given column. </p>
  
  <pre><code>  pl &lt;- ggplot(df,aes(x=colA))
    pl1 &lt;- pl + geom_bar() 
    pl1 &lt;- pl1 + theme(axis.text.x = element_text(angle = 90, hjust = 1))
    pl1 &lt;- pl1 + xlab('Labels')+ ylab('Count')
    pl1 &lt;- pl1 + ggtitle('Some Title') + theme(plot.title = element_text(hjust = 0.5))
  
    print(pl1)
  </code></pre>
  
  <p>However, I would like to depict the counts for all the three columns on the same bar chart not on there separate diagrams. I do not want to aggregate the counts for the three columns but <strong>depict the columns separately on the same diagram, maybe in groups for each label</strong> but I do not know whether grouping is the right choice in this case. The data format, I think, I need to create the desired chart:</p>
  
  <pre><code>Labels,  colA, colB, colC
  label1,     1,    2,    0,
  label2,     0,    0,    2,
  label3,     1     0,    1,
  label4,     1,    2,    0,
  label5,     1,    0,    1,
  </code></pre>
  
  <p><strong>Question 1:</strong> How can I reformat the data from the present format to the desired one?</p>
  
  <p><strong>Question 2:</strong> How can the data be presented on the same bar chart with the counts?</p>