CreateTimeSeriesObjectWithForecastFlags {MacrobondAPI} | R Documentation |
Create a TimeSeries
object with forecast flags that can be uploaded to the server using the UploadOneOrMoreTimeSeries
method.
CreateTimeSeriesObjectWithForecastFlags(name, description, region, category, frequency, startDateOrDates, values, forecastFlags, dayMask = TimeSeriesWeekdays[["MondayToFriday"]], metadata = CreateEmptyMetadata())
name |
The name of the time seires. 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. |
forecastFlags |
A vector of logical values. It must have the same length as the |
dayMask |
Optionally a value or name from the list |
metadata |
Optionally a |
A object of type TimeSeries
is returned.
CreateTimeSeriesObject
,
TimeSeries
,
UploadOneOrMoreTimeSeries
,
getForecastFlags
seriesNew = CreateTimeSeriesObjectWithForecastFlags("ih:mb:priv:s1", "My forecast", "us", "Forecasts", "Monthly", as.Date("1990-01-01"), c(12.2, 12.7, 12.8, 13.0), c(FALSE, FALSE, FALSE, TRUE)) UploadOneOrMoreTimeSeries(seriesNew)