title: Error in running bookdown package
body: <p>I have multiple Red files that I am joining with <code>bookdown</code>. This has gone OK until I got the following error message
  label: error_chunk</p>
  
  <blockquote>
    <p>Quitting from lines 2941-2947 (bookdown-demo.Rmd) 
    Error in model.frame.default(formula = glu ~ age, drop.unused.levels = TRUE) : 
      variable lengths differ (found for 'age')
    Calls:  ... lm -> eval -> eval ->  -> model.frame.default
    Execution halted</p>
    
    <p>Exited with status 1.</p>
  </blockquote>
  
  <p>error_chunk is the following code:-</p>
  
  <pre><code>```{r error_chunk}
  sample1 &lt;- data.frame(glu=c(120,130,140,150), age=c(55,60,65,70))
  attach(sample1)
  #For linear regression analysis, the function lm (linear model) is used
  fit&lt;-lm (glu~age)
  print(fit)
  ```
  </code></pre>
  
  <p>This is straightforward and obviously runs on its own and produces its own Rmd document.</p>
  
  <p>What is occurring in the <code>bookdown</code> environment?</p>