next up previous contents
Next: Plotting Up: Other data types for Previous: Sorting

The names attribute

In an ldats object, the names attribute associates labels with each time point. This might be useful for associating dates with the time series, for example.

Example 3.7:
\begin{Example}
\gt names(rat) <- paste(''Oct'',seq(2,by=7,length=5))
\gt rat
 Oct 2 Oct 9 Oct 16 Oct 23 Oct 30 
TIME 1 2 3 4 5
 OBS 57 86 114 139 172\end{Example}
Like ordinary S-PLUS vectors, you can index an ldats object by names; thus in the above example rat["Oct 16"] returns the value 114. The names attribute of a time series is also used as the plotting label by the identify command -- see Section 2.3.11.



David Smith
4/2/1998