beaSearch: Search a selection of indexed BEA data table names, series...

Description Usage Arguments Value Examples

Description

Searches indexed dataset table name, label, and series codes. CAUTION: Currently only works with NATIONAL datasets (NIPA, NIUnderlyingDetail, FixedAssets), temporarily excluding FixedAssets, and REGIONAL datasets (RegionalProduct, RegionalIncome)

Usage

1
beaSearch(searchTerm, beaKey = NULL, asHtml = FALSE)

Arguments

searchTerm

A word or phrase of class 'character' to be found in BEA datasets

beaKey

Character string representation of user API key. Necessary for first time use and updates; recommended for anything beyond one-off searches from the console.

asHtml

Option to return results as DT markup, viewable in browser. Allows search WITHIN YOUR ALREADY-FILTERED RESULTS ONLY. Requires package 'DT' to be installed.

Value

An object of class 'data.table' with information about all indexed sets in which the search term was found.

Examples

1
beaSearch('gross domestic product', asHtml = TRUE)

Example output

Loading required package: data.table
Creating a generic function for 'toJSON' from package 'jsonlite' in package 'googleVis'
[1] "No API key provided and no local metadata storage detected in /usr/local/lib/R/site-library/beaR/data. Please provide a valid key to use beaSearch."
Warning messages:
1: In beaSearch("gross domestic product", asHtml = TRUE) :
  Searching without specifying beaKey, e.g., 
	   beaSearch("tobacco", beaKey = "[your 36-character API key]") 
is not recommended, as the key is needed to update locally stored metadata.
2: In beaSearch("gross domestic product", asHtml = TRUE) :
  No API key provided and no local metadata storage detected in /usr/local/lib/R/site-library/beaR/data. 
		Please provide a valid key to use beaSearch.

bea.R documentation built on May 2, 2019, 1:30 p.m.

Related to beaSearch in bea.R...