CreateTimeSeriesObjectWithForecastFlags {MacrobondAPI}R Documentation

Create a timeseries object, with forecast flags

Description

Create a TimeSeries object with forecast flags that can be uploaded to the server using the UploadOneOrMoreTimeSeries method.

Usage

CreateTimeSeriesObjectWithForecastFlags(name, description, region, category, frequency, startDateOrDates, values, forecastFlags, dayMask = TimeSeriesWeekdays[["MondayToFriday"]], metadata = CreateEmptyMetadata())

Arguments

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 TimeSeriesFrequency.

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 values vector.

dayMask

Optionally a value or name from the list TimeSeriesWeekdays to be used for daily time series. The default value is "MondayToFriday".

metadata

Optionally a Metadata object.

Value

A object of type TimeSeries is returned.

See Also

CreateTimeSeriesObject, TimeSeries, UploadOneOrMoreTimeSeries, getForecastFlags

Examples

	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)

[Package MacrobondAPI version 1.1-5 Index]