regconst.Rd
Transform an irregular time series in a regular time series, or fill gaps in regular time series using the constant value method
a vector with time in the irregular series. Missing values are allowed
a vector of same length as x
and holding observations at corresponding times
allows to respecify the origin of time in the calculated regular time series. By default, the origin is not redefined and it is equivalent to the smallest value in x
the number of observations in the regular time series. By default, it is the same number than in the original irregular time series (i.e., length(x)
the time interval between two observations in the regulated time series
the rule to use for extrapolated values (outside of the range in the initial irregular time series) in the regular time series. With rule=1
(by default), these entries are not calculated and get NA
; with rule=2
, these entries are extrapolated
coefficient giving more weight to the left value (f=0
, by default), to the right value (f=
) or to a combination of these two observations (0 < f <1)
This is the simplest, but the less powerful regulation method. Interpolated values are calculated according to existing observations at left and at right as: x[reg] = x[right]*f + x[left]*(f-1), with 0 < f < 1.
An object of type 'regul' is returned. It has methods print()
, summary()
, plot()
, lines()
, identify()
, hist()
, extract()
and specs()
.
This function uses approx()
for internal calculations