Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Partition a time series into non-overlapping segments
ResourceFunction["TimeSeriesPartition"][ts,dt] partitions ts into a list of non-overlapping segments of window width dt. |
Divide a time series of 15 elements into elements 1–5, 6–10 and 11–15:
| In[1]:= |
|
| Out[1]= |
|
Partition a financial time series into annual segments:
| In[2]:= |
|
| In[3]:= |
|
| Out[3]= |
|
Show the annual segments in different colors:
| In[4]:= |
|
| Out[4]= |
|
TimeSeriesPartition is designed for TemporalData rather than simple List-like data:
| In[5]:= |
|
| Out[5]= |
|
Partition can be employed to deal with more generic List-like data:
| In[6]:= |
|
| Out[6]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License