title: Unzip a raw file within memory in R
body: <p>I need to download a zipped csv file from internet, unzip it and load it into memory as data.frame. Is there a way I can finish the whole process in memory only without reading/writing the disk? Here's what I tried:</p>
  
  <pre><code>library(RCurl)
  file &lt;- getURL(url, userpwd='user:pwd')
  tf &lt;- tempfile()
  writeBin(content(file, "raw"), tf)
  tf &lt;- unzip(tf, exdir=tempdir())
  data &lt;- read.csv(tf)
  unlink(tf)
  </code></pre>
  
  <p>I think <code>writeBin</code>, <code>unzip</code> and <code>read.csv</code> here use expensive disk I/O, but I don't know how to improve it.</p>