How to set timeout for readLines (url (), ...) function in R
I am reading json data from a slow site using "R" language with commands of the form:
my_raw_text <- readLines(url(myurl),...)
the default timeout found using "getOption (" timeout ")" is 60 seconds.
Can you tell me the "R" command to increase it to ~ 5 minutes?
I tried to put "timemout = 5 * 60" in url, but this is not accepted. There is something about socketConnection, but I'm not sure how to quickly and accurately set this up for urls. I tried to find the "setOption" command but didn't see it.
Thanks in advance.
+3
source to share
No one has answered this question yet
Check out similar questions: