title: Accummulating histogram from multiple columns in R
body: <p>I have the following data</p>
  
  <pre><code>ID | Category (1-5) | Task1(in min) | Task2(in min) | Task3(in min)
  </code></pre>
  
  <p>I would like to create a histogram plot with the different Categories on the x-axis and accumulated duration of Tasks 1, 2, 3 (coloured correspondingly) on the y-axis.</p>
  
  <p>Is this possible in R without having to change my raw data? It seems that ggplot only takes one column but not multiple ones.</p>
  
  <p>Edit: 
  My (rather poor) attempt was </p>
  
  <pre><code>library(ggplot2)
  ggplot(dataset) + geom_col(aes(x=Category, y=Task1, fill=Task2))
  </code></pre>
  
  <p>I couldn't get my head around putting multiple columns in fill.</p>
  
  <p>Here's the dput of the sample data</p>
  
  <pre><code>dataset &lt;- structure(list(ID = c(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25), Category = c("5 - Expert", "2 - Novice", "3 - Intermediate", "5 - Expert", "2 - Novice", "3 - Intermediate", "3 - Intermediate", "3 - Intermediate", "2 - Novice", "3 - Intermediate", "2 - Novice", "4 - Advanced", "2 - Novice", "3 - Intermediate", "2 - Novice", "5 - Expert", "4 - Advanced", "2 - Novice", "2 - Novice", "3 - Intermediate"), Task1 = structure(c(300, 360, 240, 180, 180, 240, 240, 360, 300, 300, 180, 360, 240, 240, 240, 300, 240, 240, 240, 240), class = c("hms", "difftime"), units = "secs"), Task2 = structure(c(480, 360, 660, 420, 660, 240, 660, 540, 780, 360, 540, 720, 360, 480, 540, 300, 420, 600, 240, 660), class = c("hms", "difftime"), units = "secs"), Task3 = structure(c(360, 480, 240, 300, 240, 240, 240, 240, 240, 180, 240, 180, 120, 120, 240, 240, 240, 240, 300, 240), class = c("hms", "difftime"), units = "secs")), row.names = c(NA, -20L), class = c("tbl_df", "tbl", "data.frame"))
  </code></pre>