Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i set a timeout for utils::download.file() in R

Tags:

r

I'm trying to download a file that requires more than 60 seconds using download.file() function. The documentation mentions the timeout option e.g.

The timeout for many parts of the transfer can be set by the option timeout which defaults to 60 seconds.

When i try to set it i get an error message

download.file("https://server/FileURL", destfile = "file.xml", timeout = 444)

Example Message

unused argument (timeout = 444)
like image 225
user1605665 Avatar asked Feb 09 '16 02:02

user1605665


1 Answers

To retrieve an option

getOption('timeout')
# [1] 60

To set an option

options(timeout=100)
like image 55
Rorschach Avatar answered Oct 24 '22 01:10

Rorschach