valetr (version 0.1.0)

getSeriesInfo: Retrieves series information

Description

Exploratory function (albeit more complete than regexSeriesLabel). The pattern arguments searches for information on series based on their group label and series label. A data.frame is returned with the series' group name, group label, group description, series label, series link and series name. This function utilizes the "Series Group" route in the Valet API and provides the full set of information available to a series. The series' link (or name) can be used in the function getSeriesData to fecth data.

Usage

getSeriesInfo(patternGroupLabel = NULL, patternSeriesLabel = NULL, ...)

Arguments

patternGroupLabel

character string as regular expression. Only accepts character string or NULL (default). If length is greater than 1, the first element is used. patternGroupLabel=NULL retrieves the details for all groups in the API.

patternSeriesLabel

character string as regular expression. Only accepts character string or NULL (default). If length is greater than 1, the first element is used. If NULL, no pattern-matching is executed on the series' label.

...

accepts the follwing extra arguments from grep: ignore.case, perl, fixed and useBytes.

Value

An \(n x 6\) data.frame with columns representing the different characteristic of a series.

Details

The data.frame returned from this function contains all information available in the Series Group router in the Valet API. This function is more complete than regexSeriesLabel. getSeriesInfo returns not only the series label and link (also available in regexSeriesLabel) but also a series' group name, group label, group description and series name.

If patternGroupLabel is NULL, then the function will retrieve information for all groups (and their associated series). This results in a longer processing time. A progress bar tracks the retrieval process.

See Also

getSeriesInfo, grep

Examples

Run this code
# NOT RUN {
# returns series info
# }
# NOT RUN {
seriesInfo <- getSeriesInfo(patternGroupLabel="(?i)consumer price",
                            patternSeriesLabel="(?i)seasonally")
# }

Run the code above in your browser using DataLab