chain_query: Pipe operator for chaining together operations.

Description Examples

Description

Imported from magrittr, use this to chain together operations in a natural way.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# instead of
a(b(c("hello")), "bob")

# we can write:

c("hello") \%>\% b() \%>\% a("bob")

# this also allows for currying common arguments:

my_query <-
   fda_query("/drug/event.json") \%>\%
   fda_api_key("ABC")

## End(Not run)

rOpenHealth/openfda documentation built on May 26, 2019, 8:50 p.m.