title: Map lists in single-row data.table
body: <p>I have a <code>data.table</code> with two columns of type <code>list</code> that I would like to combine pairwise. The following works:</p>
  
  <pre><code>dt = data.table(a=as.list(1:2), b=as.list(3:4))
  dt[, ab:= Map(c, a, b)]
  &gt; dt
  #    a b  ab
  # 1: 1 3 1,3
  # 2: 2 4 2,4
  </code></pre>
  
  <p>... but it fails when there is only a single row:</p>
  
  <pre><code>dt = data.table(a=list(1), b=list(2))
  dt[, ab:= Map(c, a, b)]
  
  Error in `[.data.table`(dt, , `:=`(ab, Map(c, a, b))) : 
    (converted from warning) Supplied 2 items to be assigned to 1 items of 
  column 'ab' (1 unused)
  </code></pre>
  
  <p>Why is this happening? What should I do differently?</p>