title: Append a column of NA values: lit() and withColumn() giving error
body: <p>I am trying to append a column of null values to a SparkR DataFrame with the following code:</p>
  
  <pre><code>w &lt;- rbind(3, 0, 2, 3, NA, 1)
  z &lt;- rbind("a", "b", "c", "d", "e", "f")
  x &lt;- rbind(3, 3, 3, 3, 3, 3)
  
  d &lt;- cbind.data.frame(w, z, x)
  B &lt;- as.DataFrame(sqlContext, d)
  
  B1 &lt;- sample(B, withReplacement = FALSE, fraction = 0.5)
  B2 &lt;- except(B, B1)
  
  col_sub &lt;- c("z", "x")
  B2 &lt;- select(B2, col_sub)
  
  B2 &lt;- withColumn(B2, "w", lit(NA))
  </code></pre>
  
  <p>But, the last expression returns the error: <code>Error in FUN(X[[i]], ...) : Unsupported data type:  null</code>. I have used the <code>lit</code> operation to produce a column of null values before, but I'm not sure why it won't work this time.</p>
  
  <p>Also, this has been discussed on SE before, see <a href="https://stackoverflow.com/questions/37812295/add-a-column-full-of-nas-in-sparkr">this question</a>. I'm completely clueless as to why my expression yields that error. For reference, I'm using SparkR 1.6.1.</p>