title: Reshaping data table by dropping column names into a new column
body: <p>Morning all,</p>
  
  <p>I decided to give R a try with regards to a task I usually perform on Excel, but due to the size of the table, the computer refused to work. Usually, I follow the procedure described <a href="https://www.extendoffice.com/documents/excel/3539-excel-convert-array-to-list.html" rel="nofollow noreferrer">here</a>.</p>
  
  <p>In short, I'd like to convert this:</p>
  
  <pre><code>dt &lt;- data.table(name = c("Jack", "Gill", "Tom", "Jerry"), Math = c(55,65,75,85), History = c(50,60,70,80), Geography = c(55,66,77,88))
  
          Math    History   Geography
  Jack    55      50        55
  Gill    65      60        66
  Tom     75      70        80
  Jerry   85      80        88
  </code></pre>
  
  <p>into this:</p>
  
  <pre><code>Jack   Math       55
  Jack   History    50
  Jack   Geography  55
  Gill   Math       65
  Gill   History    60
  Gill   Geography  66
  Tom    Math       75
  Tom    History    70
  Tom    Geography  77
  Jerry  Math       85
  Jerry  History    80
  Jerry  Geography  88
  </code></pre>
  
  <p>Any suggestions greatly appreciated :)</p>
  
  <p><strong>Edit</strong>: Duplicate. Thank you, akrun for pointing me in the right direction!</p>