match.tol: Determine matching observation with a tolerance in time-scale
Description
Determine which observations in a regular time series match observation in an original irregular one, accepting a given tolerance window in the time-scale. This function is internally used for regulation (functions regul(), regul.screen() and regul.adj()
a numerical vector containing seeked values (time-scale of the regular series)
table
a numerical vector containing initial times to look for match in x
nomatch
the symbol tu use to flag an entry where no match is found. By default, nomatch=NA
tol.type
the type of adjustment to use for the time-tolerance: "left", "right", "both" (by default) or "none". If tol.type="left", corresponding x values are seeked in a window ]table-to
tol
the tolerance in the time-scale to determine if a value in x matches a value in table. If tol=0, observations in each respective series must match exactly, otherwise observations in the regulated series are interpola
Value
a vector of the same length of x, indicating the position of the matching observations in table