title: Change stringsAsFactors settings for data.frame
body: <p>I have a function in which I define a <code>data.frame</code> that I use loops to fill with data. At some point I get the Warning message:</p>
  <blockquote>
  <p>Warning messages:
  1: In <code>[&lt;-.factor</code>(<code>*tmp*</code>, iseq, value = &quot;CHANGE&quot;) :
  invalid factor level, NAs generated</p>
  </blockquote>
  <p>Therefore, when I define my data.frame, I'd like to set the option <code>stringsAsFactors</code> to <code>FALSE</code> but I don't understand how to do it.</p>
  <p>I have tried:</p>
  <pre><code>DataFrame = data.frame(stringsAsFactors=FALSE)
  </code></pre>
  <p>And also:</p>
  <pre><code>options(stringsAsFactors=FALSE)
  </code></pre>
  <p>What is the correct way to set the stringsAsFactors option?</p>