bea2List: Convert BEA API httr response payload to list

View source: R/bea2List.r

bea2ListR Documentation

Convert BEA API httr response payload to list

Description

Convert BEA API httr response payload to list

Usage

bea2List(beaPayload, isMeta = FALSE)

Arguments

beaPayload

An object with httr class 'response' from call to BEA API

isMeta

Special parameter meant to interact with metadata functions (default: FALSE)

Value

An object of class 'list' of several dimensions. View list structure using 'str(yourList)'.

Examples


userSpecList <- list('UserID' = Sys.getenv("BEA_API_KEY"),
								'Method' = 'GetData',
								'datasetname' = 'NIPA',
								'Frequency' = 'A',
								'TableName' = 'T20405',
								'Year' = 'X')
resp <- beaGet(userSpecList, asTable = FALSE)
BL <- bea2List(resp)


us-bea/bea.R documentation built on June 11, 2025, 2:35 p.m.