Learn R Programming

tigris (version 2.1)

grep_state: Find states matching a term in a state object

Description

This is just shorthand for grep(term, list_states(states), value=TRUE, ignore.case=TRUE)

Usage

grep_state(states, term)

Arguments

states

object returned from a call to state

term

equivalent to the pattern argument of grep

Examples

Run this code
if (FALSE) {
states() %>% grep_state("north")
}

Run the code above in your browser using DataLab