FetchUnifiedTimeSeriesDefault {MacrobondAPI} | R Documentation |
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.
FetchUnifiedTimeSeriesDefault(seriesNames)
seriesNames |
A list of series names. |
A list of TimeSeries
where the list item names are the series names. The list will be in the same order as the input.
CreateUnifiedTimeSeriesRequest
MakeXtsFromUnifiedResponse
TimeSeries
# 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)