title: Object "mydata" not found error in rmd
body: <p>when I run the following code in R Studio, it works (produce the graph). But, when I knit the document to HTML it gives an error as: object "mydata" not found. How can I fix it?</p>
  
  <pre><code>mydata &lt;- read.csv("impt5.csv") 
  
  get("mydata")
  
  xyplot(gdppc ~ human + unemp +inv+indust | class, data = mydata, 
               auto.key = list(x = .85, y = .035, corner = c(0, 0)), 
     layout = c(4,1), main = "Per capita gdp by class")
  </code></pre>