faceting: Set facets for a 'GDCQuery'

Description Usage Arguments Value Examples

Description

Set facets for a GDCQuery

Get facets for a GDCQuery

Usage

1
2
3
4
5
6
facet(x, facets)

get_facets(x)

## S3 method for class 'GDCQuery'
get_facets(x)

Arguments

x

a GDCQuery object

facets

a character vector of fields that will be used for forming aggregations (facets). Default is to set facets for all default fields. See default_fields for details

Value

returns a GDCQuery object, with facets field updated.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# create a new GDCQuery against the projects endpoint
gProj = projects()

# default facets are NULL
get_facets(gProj)

# set facets and save result
gProjFacet = facet(gProj)

# check facets
get_facets(gProjFacet)

# and get a response, noting that
# the aggregations list member contains
# tibbles for each facet
str(response(gProjFacet,size=2),max.level=2)

GenomicDataCommons documentation built on Nov. 8, 2020, 11:08 p.m.