title: Warning message: 'newdata' had 1 row but variables found have 0 rows
body: <pre><code>library(ISLR)
  lm.fit = lm(mpg[-1]~weight[-1], Auto)
  predict(lm.fit, data.frame(weight = Auto$weight[1]))
  </code></pre>
  
  <p>Why does this code cause the following error:</p>
  
  <pre><code>Warning message:
  'newdata' had 1 row but variables found have 0 rows
  </code></pre>
  
  <p>It doesn't cause an error for any other index but 1.</p>