window {timeDate}R Documentation

Time windows

Description

Extract the subset of a "timeDate" object observed between two time stamps.

Usage

## S3 method for class 'timeDate'
window(x, start , end, ...)

## S3 method for class 'timeDate'
cut(x, from , to, ...)

Arguments

from, to

starting date, required, and end date, optional. If supplied to must be after from.

start, end

starting date, required, and end date, optional. If supplied to must be after from.

x

an object of class "timeDate".

...

arguments passed to other methods.

Value

an object of class "timeDate"

Note

The method for cut has been discouraged in the sources for a long time (with a recommendation to use window). It will be officially deprecated in the next release and later removed or replaced by a method that is consistent with the methods for cut in base R,

Examples

  
## timeCalendar - 
   # Monthly Dates in Current Year:
   tS = timeCalendar()
   tS 
   
## window -
   # 2nd Quarter Window:
   tS[4:6]
   window(tS, tS[4], tS[6])

[Package timeDate version 4032.109 Index]