I'm trying to download some huge files (about 3Gb), that takes longer than 120 seconds to download. The library is GEOquery, which uses R.utils::downloadFile.
Usually you can set a timeout option with option("timeout"=N), and download.file honours that setting, but both curl and wget doesn't. I barely speak R-lang, but my suggestions would be to either respect the timeout setting, or allow passing extra args to curl/wget (--connect-timeout and --timeout, respectively) that could be used to pre-load args at https://github.com/HenrikBengtsson/R.utils/blob/b53c2291fbd41b2bc66991c8586c1af1fabbd9ff/R/downloadFile.R#L162 instead of using NULL.
I'm trying to download some huge files (about 3Gb), that takes longer than 120 seconds to download. The library is GEOquery, which uses
R.utils::downloadFile
.When the schema to download is
https
, the function first checks ifcurl
orwget
binaries can be found in the system. Lets supposecurl
is found, next steps is to add args to the command line, such as--insecure
,--location
,--user
, and then proceed to download throughsystem2
at https://github.com/HenrikBengtsson/R.utils/blob/b53c2291fbd41b2bc66991c8586c1af1fabbd9ff/R/downloadFile.R#L213Usually you can set a timeout option with
option("timeout"=N)
, anddownload.file
honours that setting, but bothcurl
andwget
doesn't. I barely speak R-lang, but my suggestions would be to either respect thetimeout
setting, or allow passing extra args to curl/wget (--connect-timeout
and--timeout
, respectively) that could be used to pre-load args at https://github.com/HenrikBengtsson/R.utils/blob/b53c2291fbd41b2bc66991c8586c1af1fabbd9ff/R/downloadFile.R#L162 instead of usingNULL
.