MakeXtsFromUnifiedResponse {MacrobondAPI}R Documentation

Create an xts object from a set of Macrobond time series

Description

Create an xts series object from a set of Macrobond time series. The list of series should be the result of FetchTimeSeries(seriesRequest) with an object created by CreateUnifiedTimeSeriesRequest.

Usage

MakeXtsFromUnifiedResponse(listOfSeries)

Arguments

listOfSeries

A list of time series objects with a shared calendar.

Value

An xts object with multiple variables. Each variable has the name of the Macrobond series.

Note

To create an xts object from a single time series, you can also use as.xts.TimeSeries.

See Also

CreateUnifiedTimeSeriesRequest, FetchTimeSeries, as.xts.TimeSeries, xts

Examples

seriesRequest <- CreateUnifiedTimeSeriesRequest()
addSeries(seriesRequest, "usgdp")
addSeries(seriesRequest, "uscpi")
twoSeries <- FetchTimeSeries(seriesRequest)
series.xts <- MakeXtsFromUnifiedResponse(twoSeries)

[Package MacrobondAPI version 1.1-5 Index]