Skip to contents

Fetch GDCQuery metadata from GDC

Usage

response(x, ...)

# S3 method for GDCQuery
response(x, from = 0, size = 10, ..., response_handler = jsonlite::fromJSON)

response_all(x, ...)

Arguments

x

a GDCQuery object

...

passed to httr (good for passing config info, etc.)

from

integer index from which to start returning data

size

number of records to return

response_handler

a function that processes JSON (as text) and returns an R object. Default is fromJSON.

Value

A GDCResponse object which is a list with the following members:

  • results

  • query

  • aggregations

  • pages

Examples


# basic class stuff
gCases = cases()
resp = response(gCases)
class(resp)
#> [1] "GDCcasesResponse" "GDCResponse"      "list"            
names(resp)
#> [1] "results"      "query"        "pages"        "aggregations"

# And results from query
resp$results[[1]]
#>  [1] "b9a32a1c-9c93-5a92-8b30-e09a91dc3cfc"
#>  [2] "c2829ab9-d5b2-5a82-a134-de9c591363de"
#>  [3] "f5548317-3be4-5227-a655-dfb97e6418b9"
#>  [4] "cf3bd8c5-4cd6-57c6-b07a-f20d414d0819"
#>  [5] "eaffceb7-3b14-5b19-a7f0-a43bd8c45909"
#>  [6] "c07901d8-2829-5e98-9e8a-e12faafa1626"
#>  [7] "2fc73759-0c14-5ec9-9130-825206a1211d"
#>  [8] "2c326b96-e948-5dbb-844a-a83882701ae8"
#>  [9] "7f50289e-a837-5e5f-bbd3-5e31e63d6713"
#> [10] "9af6ade7-8255-5a2e-808e-655f855ae733"