dictState: List valid states

Description Usage Arguments Author(s) Examples

Description

Fetch list of states.

Usage

1
dictState(country.code)

Arguments

country.code

Code of country as returned by dictCountry, see examples.

Author(s)

John Coene jcoenep@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
# authenticate
orionOAuth(client.id = 0000,
           client.secret = "0x00000000x00x0x000xxx0000x0xx0")
           
# dict countries
country <- dictCountry()

# dict states of random country
states <- dictState(country.code = sample(country$code, 1))

# dict US states
us <- dictState(country.code = "US")

# filter states starting with A (because why not?)
a_states <- us[grep("^A", us$value),]

# create audience
createAudience(body = list(
               audience_template_name = "A-states",
               country = "US",
               region = paste0(a_states$code, collapse="|")
))

## End(Not run)

JohnCoene/oRion documentation built on June 13, 2019, 12:44 p.m.