Builds the object every ts_*() verb takes: an ordered collection of (date, value) ordinates
on a stated time interval, mirroring the Numerics TimeSeries container.
Arguments
- dates
the ordinate dates.
- values
the ordinate values, one per date.
- interval
one of
ts_interval_names(). Default"one_day".
Details
dates may be POSIXct, Date, ISO 8601 character strings, or numeric seconds since
1970-01-01; they are carried as UTC POSIXct and returned that way. Missing observations are
NA (or NaN) in values and stay missing through every verb that says so.
The interval is not merely a label: it is what ts_shift(by = "start") walks, what
ts_peaks_over_threshold() measures its independence criterion in, and what
ts_convert_interval() converts from. "irregular" is the right choice for an event series
(annual maxima, peaks over threshold) whose spacing is not fixed.
See also
ts_block_series() for annual maxima, ts_peaks_over_threshold() for a POT series,
ts_statistics() for a summary.