bfs_search {BFS}R Documentation

Search titles of available BFS datasets

Description

Returns a tibble containing the titles, publication date, observation periods, data source, metadata url and download urls of available BFS datasets in a given language which match the given criteria. This function leverages the R base function grepl but calls the data argument first to allow the use of the pipe operator from magrittr.

Usage

bfs_search(
  data = bfs_get_metadata(),
  pattern,
  ignore.case = TRUE,
  fixed = FALSE
)

Arguments

data

The data frame to search. This can be either a data frame previously fetched using bfs_get_metadata (recommended) or left blank, in which case a temporary data frame is fetched. The second option adds a few seconds to each search query.

pattern

A regular expression string to search for.

ignore.case

Whether the search should be case-insensitive.

fixed

logical. If TRUE, pattern is a string to be matched as is.

Value

A data frame.

See Also

bfs_get_metadata

Examples

meta_en <- bfs_get_metadata(language = "en")
bfs_search(data = meta_en, pattern = "university students")


[Package BFS version 0.3.1 Index]