mr_names_search: Search for region names

Description Usage Arguments Value Examples

View source: R/region_names_search.R

Description

Search for region names

Usage

1

Arguments

x, q

Either a tbl_df, returned from mr_names, or a query as a character string. If a tbl_df, you must pass a query string to q. If a query string (character) is passed to x, leave q as NULL

...

Parameters passed on to agrep

Value

NULL if no matches found, or a data.frame, or tibble, of class tbl_df, with slots:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Get region names with mr_names() function
(res <- mr_names("MarineRegions:eez"))

# to save time, pass in the result from mr_names()
mr_names_search(res, q = "Amer")

# if you don't pass in the result from mr_names(), we have to
# call mr_names() internally, adding some time
mr_names_search(x = "iho", q = "Black")
mr_names_search(x = "iho", q = "Sea")

# more examples
mr_names_search("iho", "Sea")
(res <- mr_names("MarineRegions:iho"))
mr_names_search(res, q = "Sea")

## End(Not run)

mregions documentation built on May 2, 2019, 6:53 a.m.