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
url r web


source to share


No one has answered this question yet

Check out similar questions:

4622
What is the maximum URL length in different browsers?
4193
What is the difference between URI, URL and URN?
3419
How do I change the URI (URL) for a remote Git repository?
2853
Get the current url using JavaScript?
2701
How do I get the values โ€‹โ€‹of a query string in JavaScript?
2474
How to make a great R reproducible example
2366
Encode url in JavaScript?
2170
How can I change the url without reloading the page?
1690
Get current url using jQuery?
978
Get full url in PHP



All Articles
Loading...
X
Show
Funny
Dev
Pics