title: Using R to download zipped data file, extract, and import data
body: <p>@EZGraphs on Twitter writes:
  "Lots of online csvs are zipped. Is there a way to download, unzip the archive, and load the data to a data.frame using R? #Rstats"</p>
  
  <p>I was also trying to do this today, but ended up just downloading the zip file manually.</p>
  
  <p>I tried something like:</p>
  
  <pre><code>fileName &lt;- "http://www.newcl.org/data/zipfiles/a1.zip"
  con1 &lt;- unz(fileName, filename="a1.dat", open = "r")
  </code></pre>
  
  <p>but I feel as if I'm a long way off.
  Any thoughts?</p>