series: Retrieve Series Table

Description Usage Arguments Details Value See Also Examples

View source: R/accessdb.R

Description

This function pulls and returns a table called 'SERIES' from the database.

Usage

1
series(dsid = NULL, dataset.info = TRUE, ordered = TRUE, return.query = FALSE)

Arguments

dsid

character. (Optional) id's of datasets matching the 'DSID' column of the 'DATASET' table (retrieved using datasets()) for which series information is to be returned.

dataset.info

logical. TRUE returns additional information from the 'DATASET' table about the datasets in which the series are recorded. FALSE only returns the raw 'SERIES' table.

ordered

logical. TRUE orders the result in the order data was entered into the database, while FALSE returns the result in a random order, to the benefit of faster query execution.

return.query

logical. TRUE will not query the database but instead return the constructed SQL query as a character string.

Details

The 'SERIES' table gives information about all of the time series in the database. Each series is given a code which is however not unique across datasets (see .IDvars). Each series also has a label describing the series. Further information recorded are the minimum and maximum time coverage, and (optionally) a separate series source and url. By default dataset.info = TRUE and the frequency of the data, the date when the dataset containing the series was last updated, the dataset and data source are added to the 'SERIES' table from the 'DATASET' table.

If dataset.info = FALSE, the 'DATASET' table is not joined to the 'SERIES' table, and ordered = TRUE only orders the series within each dataset to maintain the column order of series in the source data. In that case the datasets are returned in alphabetic order of 'DSID', not the order in which they were entered into the 'DATASET' table.

Value

A data.table with information about the available time series in the database.

See Also

datasets, ugatsdb

Examples

1
2
3
4
5
6
7
8
# By default returns all series with additional information
series()

# Raw series table
series(dataset.info = FALSE)

# Only series in the Monthly Macroeconomic Indicators of the BoU
series("BOU_MMI")

ugatsdb documentation built on Nov. 26, 2021, 1:06 a.m.