CreateTimeSeriesObject {MacrobondAPI} | R Documentation |
Create a TimeSeries
object that can be uploaded to the server using the UploadOneOrMoreTimeSeries
method.
CreateTimeSeriesObject(name, description, region, category, frequency, startDateOrDates, values, dayMask = TimeSeriesWeekdays[["MondayToFriday"]], metadata = CreateEmptyMetadata())
name |
The name of the time series. This must start with one of the prefixes "ih:mb:priv:", "ih:mb:com:", "ih:mb:dept:" or "ih:mb:lib:" and followed by a name that starts with a letter (a-z) and is followed by letters and digits. |
description |
A single line of text that describes the time series. This will, for instance, be used as the default title in charts. |
region |
A region code based on the ISO 3166 standard. There is a list of supported codes here: List of region codes. |
category |
The category of the series. This is used to group the series when browsing the database. |
frequency |
A value or name from the list |
startDateOrDates |
A single date, which will be used as the start date, or a list with one date for each observation. |
values |
A vector of values. |
dayMask |
Optionally a value or name from the list |
metadata |
Optionally a |
A object of type TimeSeries
is returned.
CreateTimeSeriesObjectWithForecastFlags
,
TimeSeries
,
UploadOneOrMoreTimeSeries
seriesNew = CreateTimeSeriesObject("ih:mb:priv:s1", "My forecast", "us", "Forecasts", "Monthly", as.Date("1990-01-01"), c(12.2, 12.7, 12.8, 13.0)) UploadOneOrMoreTimeSeries(seriesNew)