Lower case for a (factor) data frame column
<p>I have a <code>data.frame</code> in this format:</p>

<pre><code>'data.frame':   244 obs. of  1 variable:
 $ names: Factor w/ 244 levels "ERA","BAKE",..: 1 2 3 4 5 6 7 8 9 10 ...
</code></pre>

<p>I used this to convert it to lower case:</p>

<pre><code>df$names &lt;- tolower(df$names)
</code></pre>

<p>and as result I get this:</p>

<pre><code>&gt; str(df)
'data.frame':   244 obs. of  1 variable:
 $ names: chr  "era" "bake" "and" "stock price" ...
</code></pre>

<p>How can I keep the structure of the initial <code>data.frame</code> while also converting to lower case?</p>