Re: [R] Closing FTP sessions with RCurl

2016-06-15 Thread William Dunlap via R-help
>With the call to gc(), the garbage collector will be called some time in the >future and the finalizers will be run then. Typo: that initial 'With' should be 'Without'. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Jun 15, 2016 at 12:57 PM, William Dunlap wrote: > >>rm(curl) # rel

Re: [R] Closing FTP sessions with RCurl

2016-06-15 Thread J Payne
: Tom Wright , R help list Subject: Re: [R] Closing FTP sessions with RCurl >>rm(curl) # release the curl! (does this end the session???) Try adding a call to gc() immediately after this removal. That will force an immediate run of any finalizer associated with the object just r

Re: [R] Closing FTP sessions with RCurl

2016-06-15 Thread William Dunlap via R-help
>>rm(curl) # release the curl! (does this end the session???) Try adding a call to gc() immediately after this removal. That will force an immediate run of any finalizer associated with the object just removed. With the call to gc(), the garbage collector will be called some time in the futur

Re: [R] Closing FTP sessions with RCurl

2016-06-15 Thread J Payne
Thanks Tom! I tried that and it didn’t work, but perhaps there are other problems. The system administrator wrote “I think closing sessions immediately upon completion of the transfer, or continuing to use the same session for additional requests would both have a similar and positive effect.”

Re: [R] Closing FTP sessions with RCurl

2016-06-14 Thread Tom Wright
No expert here, and this isn't tested. It seems you can set the forbid.reuse option which will cause curl to shutdown the connection after transfer is complete. if(url.exists("http://www.omegahat.net/RCurl/index.html";)) { curl <- getCurlHandle() curlSetOpt(.opts=list(forbid.reuse=1),curl=cu

[R] Closing FTP sessions with RCurl

2016-06-14 Thread J Payne
Does anyone know how to close an FTP session with RCurl?  I am trying to automate the process of downloading snow data from a government website, and their server is throttling the connection after a few files are downloaded.  I contacted their system administrator, who wrote: “My suspicion at t