Get sliding window indices
A time series or numeric vector
Size of the window to slide across y
Size of steps between windows. Can be larger than win
, but is ignored if overlap
is not NA.
A value between [0 .. 1]
. If overlap is not NA
(default), the value of step
is ignored and set to floor(overlap*win)
. This produces indices in which the size of step
is always smaller than win
, e.g. for fluctuation analyses that use binning procedures to represent time scales.
If not NA
, or, FALSE
a list object with fields that match one or more arguments of ts_trimfill (except for x,y
), e.g. list(action="trim.NA",type="end",padding=NA,silent=TRUE)
. See Return value
below for details.
Whether to right ("r"
), center ("c"
), or left ("l"
) align the window.
Silent mode.
If adjustY
is a list object with fields that represent arguments of ts_trimfill, then the (adjusted) vector y
is returned with an attribute "windower"
. This is a list object with fields that contain the indices for each window that fits on y
, given win
, step
or overlap
and the settings of adjustY
. If adjustY = NA
, only the list object is returned.
An attribute time
is returned with the time index based on the alignment
arguments.
Other Time series operations:
ts_center()
,
ts_changeindex()
,
ts_checkfix()
,
ts_detrend()
,
ts_diff()
,
ts_discrete()
,
ts_duration()
,
ts_embed()
,
ts_integrate()
,
ts_levels()
,
ts_peaks()
,
ts_permtest_block()
,
ts_permtest_transmat()
,
ts_rasterize()
,
ts_sd()
,
ts_slice()
,
ts_slopes()
,
ts_standardise()
,
ts_sumorder()
,
ts_symbolic()
,
ts_trimfill()
Other Tools for windowed analyses:
plotMRN_win()