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
16
17
## 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 <- facility("recalls") %>%
              model_year("2010") %>%
              vehicle_make("ford") %>%
              vehicle_model("f-150") %>%
              nhtsa_fetch()

## End(Not run)

statwonk/openNHTSA documentation built on May 30, 2019, 10:43 a.m.