Trim the largest vector by cutting it, or filling it with NA
.
Fill the shortest vector with padding.
Arguments
- x
A numeric vector
- y
A numeric vector
- action
Use
"fill"
to fill the shortest vector withpadding
(default);"trim.cut"
to trim the longest vector to the length of the shortest;"trim.NA"
to fill the longest vector withNA
. This is a shortcut for runningaction = "trim.cut"
withpadding=NA
, which can be useful if one wants to match the shortest series, but preserve the original length of largest vector.- type
Should trimming or filling take place at the
"end"
(default), or"front"
of the vector? The option"center"
will try to distribute trimming byNA
or filling bypadding
evenly across the front and end of the vector.- padding
A value to use for padding (default =
0
)- silent
Run silent-ish
See also
il_mi
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_windower()
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_windower()