title: Error when knitr has to download a zip file
body: <p>Due to clash with the network security system the only way I cand download a data file from the internet to an area in the network where it can be used in R it is by downloading it through R itself. When I run the script in RStudio it works fine. When I try to knit the script I will get either the message <code>Unsupported URL</code> or I will get</p>
  
  <pre><code>Error in file(file, "rt") : cannot open the connection 
  Calls: &lt;Anonymous&gt; ... withVisible -&gt; eval -&gt; eval -&gt; read.csv -&gt; 
      read.table -&gt; file
  Execution halted
  </code></pre>
  
  <p>below is the code that works under normal running but not during the knitting process.</p>
  
  <pre><code>url &lt;- "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip"
  download.file(url, "repdata-data-activity.zip")
  unzip("repdata-data-activity.zip")
  </code></pre>
  
  <p>If the file wasn't a zip I could download it using <code>RCurl</code>, but when I tried that R crashed, I have also tried <code>method = "curl", setInternet2(TRUE)</code>, and trying to remove the <code>s</code> from <code>https</code> but none of them have worked.</p>
  
  <p>The result is that I cannot produce a knitted document which is a problem. I have previous on a very similar problem ( a CSV file not a zipped CSV file, see link below) and have tried the advice but without success: <a href="https://stackoverflow.com/questions/19890633/r-produces-unsupported-url-scheme-error-when-getting-data-from-https-sites">R produces &quot;unsupported URL scheme&quot; error when getting data from https sites</a></p>
  
  <p>I am using Windows 7 and RStudio</p>
  
  <p>To repeat: this is ONLY a problem WHEN KNITTING the document, not when running the script.</p>