Purpose
This would serve as a quick recap of all the important properties of TimeSeries Objects.

Basically there are various classes in R to store date and time. If one needs to create a timeseries objects, there are basically 3 choices. zoo, xts and timeSeries.

zoo and xts store the index class , the class that was used in the creation of index object timeSeries always stores the index as timeDate, which is internally stored with GMT timezone. So, timeSeries objects are much more reliable across different timezones and DSTs. Since there is some standardization in the way the timeseries objects are stored internally , RMetrics uses this extensively and Since I am big fan of RMetrics, most of my computations would have timeSeries objects in them.

timeSeries objects always store the index class as numeric. So, the internal structure is kind of standardized.

As far as date representation is concerned, there are a few options like POSIXct , POSIXlt, Date, ISODate , ISODatetime, timeDate,

POSIXct and POSIXlt inherit from the Virtual Class POSIXt. These classes are usually needed if timezone information or intraday data needs to be stored or TZ needs to be stored.

Date can be safely used for creating zoo and xts classes where timezone information is junk. If all one desires is to store the data in an uniform data format, then Date can be safely used in the creation of zoo or xts objects.

However timeSeries objects have an advantage of storing the data in the order of the arrival. zoo and xts objects store the timeseries data in the regular order even though input is of reverse order. Sometimes this is not desired and hence timeSeries objects are much better as the order of dates are preserved. This is all the more important in the high frequency data analysis.

One thing to remember is that it is not possible to create zoo and xts objects with reverse dates.

Another thing about zoo and xts to remember is the attribute identifier. You can store whatever you want as an attribute of zoo or xts object.However you need to remember that once the a new object is created by assigning the old object, the attribute is chucked for an zoo object. The new object retains the attribute for an xts and timeSeries object

rbind acts in a strange way on zoo and xts objects. rbind always gives ordered time series . rbind on timeSeries preserves the order in which the records appear

cbind doesn’t discriminate amongst various date objects. cbind always binds columns in the same order as they appear in the cbind arguments.

There are other functions that can be used with zoo, xts, and timeSeries objects mainly to work with the missing observations, doing a linear interpolation , working on aggregates etc.

The following is a flavor of functions that can be used in the context of time series object

> data <- c(NA, data, rep(NA, 2))
> charvec <- paste("2009-0", 1:5, "-01", sep = "")
> x <- zoo(data, as.Date(charvec))
> x
2009-01-01 2009-02-01 2009-03-01 2009-04-01 2009-05-01
        NA  0.0219246 -0.9043255  0.4132378  0.1866212
> na.locf(x)
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> na.approx(x)
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> na.spline(x)
2009-01-01 2009-02-01 2009-03-01 2009-04-01 2009-05-01
 7.2775717  0.0219246 -0.9043255  0.4132378  0.1866212
> na.trim(x)
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> na.omit(x)
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> na.omit(x, "iz")
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> na.omit(x, "ie")
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> na.contiguous(x)
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212
> is.na(x)
[1]  TRUE FALSE FALSE FALSE FALSE
> na.trim(x, sides = "left")
2009-02-01 2009-03-01 2009-04-01 2009-05-01
 0.0219246 -0.9043255  0.4132378  0.1866212