'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("https://server/FileURL", destfile = "file.xml", timeout = 444)

Example Message

unused argument (timeout = 444)
r


Solution 1:[1]

To retrieve an option

getOption('timeout')
# [1] 60

To set an option

options(timeout=100)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rorschach