

   time {base}                                  R Documentation

   SSaammpplliinngg TTiimmeess ooff TTiimmee SSeerriieess

   DDeessccrriippttiioonn::

        `time' creates the vector of times at which a time
        series was sampled.

        `cycle' gives the positions in the cycle of each obser-
        vation.

        `frequency' returns the number of samples per unit time
        and `deltat' the time interval between observations
        (see `ts').

   UUssaaggee::

        time(x, offset=0, ...)
        cycle(x, ...)
        frequency(x, ...)
        deltat(x, ...)

   AArrgguummeennttss::

          x: a univariate or multivariate time-series, or a
             vector or matrix.

     offset: can be used to indicate when sampling took place
             in the time unit. `0' (the default) indicates the
             start of the unit, `0.5' the middle and `1' the
             end of the interval.

        ...: extra arguments for future methods.

   DDeettaaiillss::

        These are all generic functions, which will use the
        `tsp' attribute of `x' if it exists. `time' and `cycle'
        have methods for class `ts' that coerce the result to
        that class.

   SSeeee AAllssoo::

        `ts', `start', `tsp', `window'.

        `date' for clock time, `system.time' for CPU usage.

   EExxaammpplleess::

        data(presidents)
        cycle(presidents)
        # a simple series plot: c() makes the x and y arguments into vectors
        plot(c(time(presidents)), c(presidents), type="l")

