Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Make a time series in full periods of specified granularity by padding with Missing
ResourceFunction["TimeSeriesPad"][ts,gran] makes ts in full periods of gran by padding Missing[] on both sides wherever necessary. | |
ResourceFunction["TimeSeriesPad"][ts,gran,pad] pads with element pad. |
Extend a time series into a whole month by padding Missing[] at both ends:
In[1]:= |
Out[3]= |
Pad a time series with a customised padding element:
In[4]:= |
Out[4]= |
TimeSeriesPad may assist partitioning using natural temporal granules with "nice" bounds:
In[5]:= |
Out[6]= |
The padded time series may have a different minimal time increment due to inclusion of ending time stamps of specified temporal granule:
In[7]:= |
Out[8]= |
However, except for the bounding time stamps, TimeSeriesPad respects the minimum time increment of the original time series to pad:
In[9]:= |
Out[9]= |
This work is licensed under a Creative Commons Attribution 4.0 International License