Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rba_pages

Get Multiple Pages of a Paginated Resource


Description

Some resources return paginated results, meaning that you have to make separate calls for each page. Using this function, you can iterate over up to 100 pages. Just provide your rbioapi function and change to page argument to "pages:start_page:end_page", for example "pages:1:5".

Usage

rba_pages(input_call)

Arguments

input_call

A quoted call. Provide a regular rbioapi function call, but with two differences:

  1. : Wrap a quote() around it. meaning: quote(rba_example())

  2. : Set the argument that corresponds to the page number to "pages:start_page:end_page", for example "pages:1:5".

refer to the "examples" section to learn more.

Details

To prevent flooding the server, there will be a 1 second delay between calls, also the user cannot iterate on more than 100 pages. The function will also override skip_error option and will always set it to TRUE. This means that in case of server response error (e.g. requesting pages that do not exist) an error message be returned to you instead of halting function's execution.

Value

A named list where each element corresponds to a request's page.

See Also

Other "Helper functions": rba_connection_test(), rba_options()

Examples

rba_pages(input_call = quote(rba_uniprot_taxonomy(ids = 189831,
    hierarchy = "siblings",
    page_size = 50,
    page_number = "pages:1:5")))


rba_pages(input_call = quote(rba_uniprot_taxonomy_name(name = "adenovirus",
    field = "scientific",
    search_type = "contain",
    page_size = 200,
    page_number = "pages:1:5",
    verbose = FALSE)))


rba_pages(input_call = quote(rba_panther_info(what = "families",
    families_page = "pages:9:11")))

rbioapi

User-Friendly R Interface to Biologic Web Services' API

v0.7.0
GPL-3
Authors
Moosa Rezwani [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.