title: downloading files from the secure ftp server with R
body: <p>I need to download files from sftp server and parse them and insert to contents to the database.</p>
  
  <p>I am currently using rCurl as follows:</p>
  
  <pre><code>library(RCurl) 
  url&lt;-c("sftp://data.ftp.net/incomining.data.txt")
  x&lt;-getURL(url, userpwd="&lt;id&gt;:&lt;passwd&gt;")
  writeLines(x, incoming.data.txt"))
  </code></pre>
  
  <p>I also looked at download.file and I dont see sftp sufpport in download.file. Has anybody else done similiar work like this? Since I will be getting multiple files, I noticed that rcurl sometimes times out. I like to sftp download  all the files from the sftp server first then process it. Any ideas?</p>