你好,ts主要用来生成有规则的时间序列。对于无规则的,可以尝试如下几个包,他们的介绍如下:
•The zoo package provides infrastructure for regularly and irregularly spaced time series using arbitrary classes for the time stamps (i.e., allowing all classes from the previous section). It is designed to be as consistent as possible with "ts". Coercion from and to "zoo" is available for all other classes mentioned in this section.
•The package xts is based on zoo and provides uniform handling of R's different time-based data classes.
•Various packages implement irregular time series based on "POSIXct" time stamps, intended especially for financial applications. These include "its" from its, "irts" from tseries, and "fts" from fts.
•The class "timeSeries" in timeSeries (previously: fSeries) implements time series with "timeDate" time stamps.
•The class "tis" in tis implements time series with "ti" time stamps.
•The package tframe contains infrastructure for setting time frames in different formats.