title: Combine multiple columns to one list column
body: <p>I would like to combine multiple columns to one list column in a data.table in R. Example:</p>
  <pre class="lang-r prettyprint-override"><code>require(data.table)
  
  dt = data.table(col1 = LETTERS[1:5],
                  col2 = rep('test', 5),
                  col3 = c('hello', 'yes', 'no', 'maybe', 'why'))
  </code></pre>
  <p><strong>Q:</strong> How can I combine <code>col2</code> and <code>col3</code> into a list column?</p>
  <p>What I've tried so far:</p>
  <pre class="lang-r prettyprint-override"><code>cols = c('col2', 'col3')
  dt[ , col4 := paste0(.SD, collapse = ', '), .SDcols = cols,
      by = 1:nrow(dt) ] # paste's them together
  dt[ , col4 := c(.SD), .SDcols = cols,
      by = 1:nrow(dt) ] # drops col3
  dt[ , col4 := lapply(.SD, c), .SDcols = cols,
      by = 1:nrow(dt) ] # drops col3
  </code></pre>