timeSequence {fCalendar}R Documentation

Regularly spaced 'timeDate' objects

Description

Create a regularly spaced object of class 'timeDate'.

Usage

timeSequence(from, to = format(Sys.time(), "%Y-%m-%d"),
    by = c("day", "year", "quarter", "month", "week", "hour", "min", "sec"),
    length.out = NULL, format = NULL,
    zone = myFinCenter, FinCenter = myFinCenter)

## S3 method for class 'timeDate':
seq(from, to, by = c("day", "year", "quarter", "month",
    "week", "hour", "min", "sec"), length.out = NULL, ...)

Arguments

from, to [timeSequence] -
starting date, required, and end date, optional. If supplied to must be after from,
[seq] - cr in this case the from and to dates must be objects of class timeDate.
by a character string, containing one of "sec", "min", "hour", "day", "week", "month" or "year". This can optionally be preceded by an integer and a space, or followed by "s".
length.out length.out integer, optional. Desired length of the sequence, if specified "to" will be ignored.
format the format specification of the input character vector.
zone the time zone or financial center where the data were recorded.
FinCenter a character with the the location of the financial center named as "continent/city".
... arguments passed to other methods.

Value

returns a S4 object of class "timeDate".

Note

seq is a synonyme generic function for timeSequence.

Examples

## timeSequence -
   
   timeSequence(from = "2004-03-12", to = "2004-04-11",
        format = "%Y-%m-%d", FinCenter = "GMT")
        
   timeSequence(from = "2004-03-12", to = "2004-04-11",
        format = "%Y-%m-%d", FinCenter = "Europe/Zurich")

[Package fCalendar version 270.78.3 Index]