

   TTiimmee WWiinnddoowwss

        window(x, start, end, frequency, deltat)

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

          x: a time-series or other object.

      start: the start time of the period of interest.

        end: the end time of the period of interest.

   frequency: the new sampling frequency, which should be a
             sub-multiple of the original frequency.

     deltat: the new time interval between observations, which
             should be a multiple of the original frequency.

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

        `window' is a generic function which extracts the sub-
        set of the object `x' observed between the times
        `start' and `end'.

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

        The default method applies to objects with a `tsp'
        attribute, or vectors or matrices (which are assumed to
        have been observed at times `1' to `NROW(x)').

        The start and end times are rounded to the nearest sam-
        pling time. This is for S compatibility.

   VVaalluuee::

        An object with a `tsp' attribute, and with class that
        of the `x' unless (as for time series) that class is
        changed by subsetting. The `ts' ensures the result has
        class `"ts"'.

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

        `time', `ts'.

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

        data(presidents)
        sixties <- window(presidents, 1960, c(1969,4))

        data(sunspots)
        ## all June values in 20th century
        window(sunspots, start=c(1901,6), frequency=1)

