FetchUnifiedTimeSeriesDefault {MacrobondAPI}R Documentation

Download a set of series and convert them all to a shared calendar using the default settings

Description

This method will create a SeriesRequest with the default settings and download the series. If you want to specify settings for frequency, missing value and currency conversion, you should use CreateUnifiedTimeSeriesRequest instead. See the section with examples below.

Usage

FetchUnifiedTimeSeriesDefault(seriesNames)

Arguments

seriesNames

A list of series names.

Value

A list of TimeSeries where the list item names are the series names. The list will be in the same order as the input.

See Also

CreateUnifiedTimeSeriesRequest MakeXtsFromUnifiedResponse TimeSeries

Examples

# Download two series and create a data frame
twoSeries <- FetchUnifiedTimeSeriesDefault(c("usgdp", "uscpi"))
series.xts <- MakeXtsFromUnifiedResponse(twoSeries)

# The code above is equivalent to doing this
seriesRequest <- CreateUnifiedTimeSeriesRequest()
addSeries(seriesRequest, "usgdp")
addSeries(seriesRequest, "uscpi")
twoSeries <- FetchTimeSeries(seriesRequest)
series.xts <- MakeXtsFromUnifiedResponse(twoSeries)

[Package MacrobondAPI version 1.1-5 Index]