MakeXtsFromUnifiedResponse {MacrobondAPI} | R Documentation |
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
.
MakeXtsFromUnifiedResponse(listOfSeries)
listOfSeries |
A list of time series objects with a shared calendar. |
An xts object with multiple variables. Each variable has the name of the Macrobond series.
To create an xts object from a single time series, you can also use as.xts.TimeSeries
.
CreateUnifiedTimeSeriesRequest
,
FetchTimeSeries
,
as.xts.TimeSeries
,
xts
seriesRequest <- CreateUnifiedTimeSeriesRequest() addSeries(seriesRequest, "usgdp") addSeries(seriesRequest, "uscpi") twoSeries <- FetchTimeSeries(seriesRequest) series.xts <- MakeXtsFromUnifiedResponse(twoSeries)