The ts_put_nth_elem() function

The ts_put_nth_elem() function puts new elements into an existing regular time series at a specified offset.

Syntax

ts_timeseries *
ts_put_nth_elem(ts_tsdesc  *tsdesc, 
                 ts_tselem  tselem, 
                 mi_integer N)
tsdesc
The time series to be updated.
tselem
The element to add; any time stamp in the element is ignored.
N
The offset, indicating where the element to add should be placed. Offsets start at 0.

Returns

The original time series with the element added. If the time series is irregular, an error is raised.