Learn R Programming

timeDate (version 280.79)

as: Any to 'timeDate' Coercion

Description

Coerce other time date representations into an object of class 'timeDate'.

Usage

## S3 method for class 'timeDate':
as.character(x, \dots)

## S3 method for class 'timeDate': as.double(x, units = c("auto", "secs", "mins", "hours", "days", "weeks"), ...) ## S3 method for class 'timeDate': as.data.frame(x, \dots)

## S3 method for class 'timeDate': as.POSIXct(x, tz = "", \dots)## S3 method for class 'timeDate': as.POSIXlt(x, tz = "", \dots)

## S3 method for class 'timeDate': as.Date(x, method = c("trunc", "round", "next"), ...)

Arguments

x
an object of class timeDate.
units
a character string denoting the date/time units in which the results are desired.
tz
inputs the time zone to POSIX objects, i.e. the time zone, zone, or financial center string, FinCenter, as used by timeDate objects.
method
a character string denoting the method how to determine the dates.
...
arguments passed to other methods.

Value

  • return an object of class timeDate.

Examples

Run this code
## as.character -
   # Convert 'timeDate' to a character strings:
   as.character(timeCalendar())

Run the code above in your browser using DataLab