title: need finite xlim values in R
body: <pre><code>plot(mdhdi$Human.Development.Index..HDI.,mdhdi$SumOfMedals, xlab="HDI", ylab="Total Medals")
  a = lm(mdhdi$SumOfMedals ~ mdhdi$Human.Development.Index..HDI.)
  abline(a, col="red")
  </code></pre>
  
  <p>This code works well in script and gives me the plot with linear models.
  However, when I'm trying to run exactly the same code in R markdown like below,</p>
  
  <pre><code>```{r}
  plot(mdhdi$Human.Development.Index..HDI.,mdhdi$SumOfMedals, xlab="HDI", ylab="Total Medals")
  a = lm(mdhdi$SumOfMedals ~ mdhdi$Human.Development.Index..HDI.)
  abline(a, col="red")
  ```
  </code></pre>
  
  <p>It says, 'need finite xlim values'. I really don't understand why it gives me errors like that. Can anyone help me out, please?</p>