title: data.table assignment by reference using lapply and also returning the rest of the columns
body: <p>I want to be able to apply a function over a subset of columns, and return those columns that have been manipulated along with the rest of the data columns that weren't touched. Is there a way to do this with data.table. I wasn't able to figure out the syntax.</p>
  
  <p>In this example I have NAs and want to overwrite them with something else for a few different columns. I need a way to also return other columns that weren't touched.</p>
  
  <pre><code>library(data.table)
  
  # make data set
  a &lt;- sample(c(letters[1:5], NA), 50, replace=TRUE)
  b &lt;- sample(c(LETTERS[1:5], NA), 50, replace=TRUE)
  c &lt;- sample(runif(50))
  
  x &lt;- data.table(a,b,c)
  
  # function to apply to a single column
  overwriteNA &lt;- function(vec, new="") ifelse(is.na(vec), new, vec)
  
  # Only returns .SDcols but would like to also include rest of columns in data.table
  x[, lapply(.SD, overwriteNA), .SDcols=c("a", "b")]
  
  # Need something along these lines
  x[, `:=` lapply(.SD, overwriteNA), .SDcols=c("a", "b")]
  </code></pre>