bde_catalog_search: Search BdE catalogs

View source: R/catalogs.R

bde_catalog_searchR Documentation

Search BdE catalogs

Description

Search for keywords on the time-series catalogs.

Usage

bde_catalog_search(pattern, ...)

Arguments

pattern

regex pattern to search See Details and Examples.

...

Arguments passed on to bde_catalog_load

catalog

A single value indicating the catalogs to be updated or "ALL" as a shorthand. See Details.

parse_dates

Logical. If TRUE the dates would be parsed using bde_parse_dates().

update_cache

Logical. If TRUE the requested file would be updated on the cache_dir.

cache_dir

A path to a cache directory. The directory can also be set via options with options(bde_cache_dir = "path/to/dir").

verbose

Logical TRUE or FALSE, display information useful for debugging.

Details

Note that BdE files are only provided in Spanish, for the time being. Therefore search terms should be provided in Spanish as well in order to get search results.

This function uses base::regex() function for finding matches on the catalogs. You can pass regular expressions to broaden the search.

Value

A tibble with the results of the query.

See Also

bde_catalog_load(), base::regex()

Other catalog: bde_catalog_load(), bde_catalog_update()

Examples



# Simple search (needs to be in Spanish)
# !! PIB [es] == GDP [en]

bde_catalog_search("PIB")

# More complex - Single
bde_catalog_search("Francia(.*)PIB")

# Even more complex - Double
bde_catalog_search("Francia(.*)PIB|Italia(.*)PIB|Alemania(.*)PIB")


# Search a sequential code: Exact match
# Note that this series (sequential code) appears on several tables

bde_catalog_search("^3779313$")



tidyBdE documentation built on July 10, 2023, 2:01 a.m.