EnforceGetURL: Enforce getting url

Description Usage Arguments Details Value Author(s) Examples

Description

Enforce to get URL

Usage

1
EnforceGetURL(tryUrl, FUN)

Arguments

tryUrl

url

FUN

Functions that can readin url, for example the "getURL()" function in the "RCurl" package.

Details

If any errors occur when getting the url, this functions holds the error and try to get url again. An infinit loop may happen if the input url could not be resoved.

Value

retured value from getURL()

Author(s)

Yulong Niu niuylscu@gmail.com

Examples

1
2
3
4
5
6
7
## Not run: 
## It will cause infinit loop
require(RCurl)
testUrl <- 'http://www.test1111111111.com/'
EnforceGetURL(testUrl, FUN = getURL)

## End(Not run)

YulongNiu/KEGG_API documentation built on May 10, 2019, 1:12 a.m.