pc.omitneg {lagged} | R Documentation |
An internal function
Description
An internal function
Usage
pc.omitneg(lags, maxlag)
Arguments
lags |
todo: describe! |
maxlag |
todo: describe! |
Details
pc.omitneg
helps to implement dropping of negative indices in
season-lag objects. It returns its first argument, lags
, if all
of its elements are non-negative. Otherwise, all elements of
lags
must be non-positive. In this case the function creates the
vector 0:maxlag
and drops the elements specified by lags. Note
that the default indexing will not work properly since zero elements in
an index are omitted (and there are such indices in season-lag
objects).
Value
for pc.omitneg
, a vector of lags (non-negative integers).
Author(s)
Georgi N. Boshnakov
Examples
# ttmatToslPairs
# pc.omitneg
lagged:::pc.omitneg(0:5,10) # 0:5, unchagend since all values >= 0
lagged:::pc.omitneg(-(0:5),10) # 6:10, works like
(0:10)[-(0:5 +1)] # same
# don't mix positive and negative numbers in pc.omitneg
## Not run: lagged:::pc.omitneg(c(0,2,3,-4,5), 10)
[Package lagged version 0.3.2 Index]