EndRule {caTools} | R Documentation |
internal function
EndRule(x, y, k, endrule=c("NA", "trim", "keep", "constant", "func"), Func, ...)
x |
numeric vector of length n |
k |
width of moving window; must be an integer between one and n. |
endrule |
character string indicating how the values at the beginning
and the end, of the data, should be treated. Only first and last k2
values at both ends are affected, where k2 is the half-bandwidth
k2 = k %/% 2 .
|
y |
numeric vector of length n, which is partially filled output of
one of the run functions. Function EndRule will fill the
remaining beginning and end sections using method chosen by endrule
argument. |
Func |
Function name that EndRule will use in case of
endrule="func" . |
... |
Additional parameters to Func that EndRule will
use in case of endrule="func" . |
Returns a numeric vector of the same length as x
. Only in case of
endrule="trim"
.the output will be shorter.
Jarek Tuszynski (SAIC) jaroslaw.w.tuszynski@saic.com