title: install.packages fails in knitr document: "trying to use CRAN without setting a mirror"
body: <p>Using the following code I got the data I wanted, but for some reason I can't figure out <code>knitr</code> doesn't let me compile a PDF document, as shown further below:</p>
  
  <p>My code:</p>
  
  <pre><code>install.packages("weatherData")
  library(weatherData)
  istanbul &lt;- getWeatherForDate("Istanbul",
                                start_date = Sys.Date() - 41, 
                                end_date = Sys.Date())
  </code></pre>
  
  <p>Works out with no problem but I get the following message trying compile the PDF:</p>
  
  <pre><code>Quitting from lines 3-31 (ist_weather.spin.Rmd) 
  Error in contrib.url(repos, type) : 
    trying to use CRAN without setting a mirror
  Calls: &lt;Anonymous&gt; ... eval -&gt; eval -&gt; install.packages -&gt; grep -&gt; contrib.url
  Execution halted
  </code></pre>