How do i set a timeout for utils::download.file() in 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("", destfile = "file.xml", timeout = 444) 

Example Message

unused argument (timeout = 444) 

1 Answer

To retrieve an option

getOption('timeout') # [1] 60 

To set an option

options(timeout=100) 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like