Add column to DataFrame in sparkR : <p>I would like to add a column filled with a character <code>N</code> in a DataFrame in SparkR. I would do it like that with non-SparkR code :</p>

<pre><code>df$new_column &lt;- "N"
</code></pre>

<p>But with SparkR, I get the following error : </p>

<pre><code>Error: class(value) == "Column" || is.null(value) is not TRUE
</code></pre>

<p>I've tried insane things to manage it, I was able to create a column using another (existing) one with <code>df &lt;- withColumn(df, "new_column", df$existing_column)</code>, but this simple thing, nope...</p>

<p>Any help ?</p>

<p>Thanks.</p>
