Learn R Programming

TTAinterfaceTrendAnalysis (version 1.5.9)

interpTs: Interpolate or substitute missing time series values (code of the former wq package)

Description

Imterpolates or substitutes missing data in a time series for gaps up to a specified size.

Usage

interpTs(x, type = c("linear", "series.median", "series.mean", "cycle.median",
"cycle.mean"), gap = NULL)

Value

The time series with some or all missing values replaced.

Arguments

x

object of class "ts" or "mts"

type

method of interpolation or substitution

gap

maximum gap to be replaced

Author

Alan D. Jassby and James E. Cloern