title: Error in rbind(deparse.level, ...) : numbers of columns of arguments do not match after storing variable as a factor
body: <p>I am running a hierarchical regression in R. When I run the following code to change my categorical variable to be stored as a factor, it causes my models to change.</p>
  
  <pre><code>#Check to see if Frame is stored as a factor (categorical variable)
  is.factor(dat$Frame)
  #Frame is not stored categorically
  #Change Frame to a factor
  dat$Frame &lt;- as.factor(dat$Frame)
  </code></pre>
  
  <p>If I do not run the above code, my models are both lists of 12. When I do run the above code, Model 2 becomes a list of 13, meaning I get an error when I run the following code:</p>
  
  <pre><code>apa.reg.table(Model1, Model2, filename="Table1_APA.doc", 
  table.number=1)
  
  Error in rbind(deparse.level, ...) : 
    numbers of columns of arguments do not match
  </code></pre>
  
  <p>The code I am using for my models are as follows:</p>
  
  <pre><code>Model1 &lt;- lm(data = dat, Memory ~ Word_Count) 
  Model2 = lm(data = dat, Memory ~ Word_Count + Frame)
  </code></pre>
  
  <p>Please tell me why changing Frame to a factor causes the number of columns in Model 2 to change. </p>