TimeSeriesMissingValueMethod {MacrobondAPI}R Documentation

Missing value methods

Description

A list of named values that determines the method for filling in missing values.

Format

The list contains named objects of type TimeSeriesMissingValueMethodClass.

Details

The frequency conversion method is used when making a unified series request and is a property of SeriesExpression.

None

Do not fill in missing values. They will remain NaN in the value vector.

Auto

Determine the method based on the series classification.

PreviousValue

Use the previous non-missing value.

ZeroValue

Use the value zero.

LinearInterpolation

Do a linear interpolation between the previous and next non-missing values.

See Also

SeriesExpression, setMissingValueMethod, getMissingValueMethod

Examples

# Fill in missing values in "spx" with a linear interpolation of surrounding values
seriesRequest <- CreateUnifiedTimeSeriesRequest()
reqExp <- addSeries(seriesRequest, "spx")
setMissingValueMethod(reqExp, "LinearInterpolation")
seriesSpx <- FetchTimeSeries(seriesRequest)[[1]]

[Package MacrobondAPI version 1.1-5 Index]