The lag order, by
, is defined the opposite way as in R base. Thus, -1 is a
lead and +1 a lag.
If by
is integer, the time stamp is shifted by the number of periods. This
requires the series to be regular.
If by
is character, the time stamp is shifted by a specific amount of time.
This can be one of one of "sec"
, "min"
, "hour"
, "day"
, "week"
,
"month"
, "quarter" or
"year", optionally preceded by a (positive or
negative) integer and a space, or followed by plural "s". This is passed to
base::seq.Date()
. This does not require the series to be regular.