title: How do I convert a logical variable to factor in Rattle
body: <p>I am using Rattle to run <code>randomForest</code> against my training data set. One of the variables has values <code>FALSE</code> and <code>TRUE</code>.</p>
  
  <pre><code>     &gt; str(mydata)
       'data.frame':  421570 obs. of  2 variables:
       $ Trial       : int  1 1 1 1 1 1 1 1 1 1 ...
       $ IsHoliday   : logi  FALSE FALSE FALSE FALSE FALSE FALSE ...
  </code></pre>
  
  <p>I am able to convert the same to a factor in R.</p>
  
  <pre><code>     &gt; mydata$IsHoliday &lt;- factor(mydata$IsHoliday)
       &gt; str(mydata)
       'data.frame':  421570 obs. of  2 variables:
       $ Trial       : int  1 1 1 1 1 1 1 1 1 1 ...
       $ IsHoliday   : Factor w/ 2 levels "FALSE","TRUE": 1 1 1 1 1 1 1 1 1 1 ...
  </code></pre>
  
  <p>When I write the <code>data.frame</code> to a CSV and load it using <code>Rattle</code>, again I am seeing it as logical only. Due to this, I am getting the error, <code>Error in na.roughfix.data.frame(x) + na.roughfix only works for numeric or factor</code></p>
  
  <p>Any help is appreciated. Thanks in advance</p>