title: R: Barplot with multiple categorical variables on the x axis (more than 2)
body: <p>I am struggling to create a barplot that contain multiple categorical variables, so my current data looks something like this</p>
  
  <pre><code>df &lt;- data.frame(ID = c(1,2,3,4), Type1 = c("A","B","A","B"), Score1 = c(10,20,30,40), Type2 = c("C","C","D","D"), Score2 = c(20,40,60,80))
  ID  Type1    Score1   Type2    Score2
  1       A        10       C        20
  2       B        20       C        40
  3       A        30       D        60
  4       B        40       D        80
  </code></pre>
  
  <p>and what I am looking for should look like this </p>
  
  <p><a href="https://i.stack.imgur.com/aHDy1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aHDy1.jpg" alt="enter image description here"></a></p>
  
  <p>Next I want to take this even further by adding more category to the graph, so the data frame is now</p>
  
  <pre><code>df2 &lt;- data.frame(ID = c(1,2,3,4), Type1 = c("A","B","A","B"), Score1 = c(10,20,30,40), Type2 = c("C","C","D","D"), Score2 = c("20","40","60","80"), Colour = c("Black","White","Black","White"))
  ID  Type1    Score1   Type2    Score2    Colour
  1       A        10       C        20     Black
  2       B        20       C        40     White
  3       A        30       D        60     Black
  4       B        40       D        80     White
  </code></pre>
  
  <p>and for this one it should look like this</p>
  
  <p><a href="https://i.stack.imgur.com/Rtl6z.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rtl6z.jpg" alt="enter image description here"></a></p>
  
  <p>When there is only one type, I usually <code>reshape</code> the data and do this with the <code>ggplot</code> command. (and most of the answer I found online is pretty much just this one)
  However, there is now more than just one type. I'm not really sure how should I go with this.
  Any suggestions?</p>