| boj_search | R Documentation |
Searches current BOJ metadata in the same spirit as WDI::WDIsearch().
Supply a database to fetch/cache metadata, or pass a metadata tibble directly
for an offline or reproducible search.
boj_search(
pattern,
db = NULL,
fields = c("series_code", "name", "category", "notes"),
regex = FALSE,
ignore_case = TRUE,
metadata = NULL,
lang = boj_default("lang", "en"),
cache = TRUE,
refresh = FALSE,
max_age = 24 * 60 * 60,
cache_dir = boj_default("cache_dir", tools::R_user_dir("bojapi", "cache")),
include_groups = FALSE,
wait = boj_default("wait", 1),
timeout = boj_default("timeout", 30),
retries = boj_default("retries", 3)
)
pattern |
One non-empty search string or regular expression. |
db |
One or more database identifiers. Not needed when |
fields |
Metadata columns to search. Defaults to series code, name, category, and notes. |
regex |
Treat |
ignore_case |
Ignore letter case. |
metadata |
Optional data frame returned by |
lang |
Response language, |
cache |
Whether to read and write the on-disk metadata cache. |
refresh |
If |
max_age |
Maximum cache age in seconds; default 86,400 (24 hours). |
cache_dir |
Metadata cache directory. |
include_groups |
Include matching hierarchy-heading rows. |
wait |
Requested seconds between automatic requests. The default is one second, and values below one are treated as one whenever another request is needed, to avoid high-frequency access prohibited by the BOJ. |
timeout |
Request timeout in seconds. |
retries |
Number of retries for network and transient server errors. |
A filtered metadata tibble.
## Not run:
boj_search("U.S. Dollar", db = "FM08")
boj_search("FXERM07", db = "FM08", lang = "jp")
boj_search("exchange|euro", db = "FM08", regex = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.