title: download file from google drive using R
body: <p>I have tried the recommendations to read a csv file in google drive. I write click on the file to get the sharable file link.</p>
  
  <p>I have tried each of these 4 methods: (I have substituted ZZZZ for what I get as the link when I right-click on the file name).</p>
  
  <p><code>x &lt;- curl("https://drive.google.com/open?id=ZZZZ") data &lt;- read.csv(x,skip=5,stringsAsFactors = F)</code></p>
  
  <p><code>id &lt;- "ZZZZ" data &lt;- read.csv(sprintf("https://drive.google.com/open?id=%s&amp;export=download",id),skip=5,stringsAsFactors = F)</code></p>
  
  <p><code>data &lt;- read.csv("https://drive.google.com/open?id=ZZZZ",skip=5,stringsAsFactors = F)</code></p>
  
  <p><code>sURL &lt;- sprintf("https://drive.google.com/open?id=%s&amp;export=download",id) con &lt;- curl(sURL); con2 &lt;- read.csv(con,skip=5,stringsAsFactors = F)</code></p>