title: how to download and unzip a zip file in R?
body: <p>I am a totally new user of R, now I need to download and unzip <a href="http://gdac.broadinstitute.org/runs/code/firehose_get_latest.zip" rel="nofollow">http://gdac.broadinstitute.org/runs/code/firehose_get_latest.zip</a> in my R, I have tried the code:</p>
  
  <pre><code>temp &lt;- tempfile()
  &gt; download.file("http://gdac.broadinstitute.org/runs/code/firehose_get_latest.zip",temp)
  </code></pre>
  
  <p>however, when I tried the following code:</p>
  
  <pre><code>data &lt;- read.table(unz(temp, "firehose_get_latest"))
  </code></pre>
  
  <p>it showed that</p>
  
  <blockquote>
  <pre><code>Error in open.connection(file, "rt") : cannot open the connection
  In addition: Warning message:
  In open.connection(file, "rt") :
    cannot locate file 'firehose_get_latest' in zip file '/tmp/RtmpotKFGQ/file11ff4f04fe46'
  </code></pre>
  </blockquote>
  
  <p>So what should I do to then?<br>
  ANY HELP ARE APPRECIATED!</p>