Learn R Programming

timeDate (version 280.79)

as.timeDate: Coercion into 'timeDate' Objects

Description

Coerce and transform objects of class 'timeDate'.

Usage

## S3 method for class 'default':
as.timeDate(x, zone = "", FinCenter = "")  

## S3 method for class 'POSIXt': as.timeDate(x, zone = "", FinCenter = "")

## S3 method for class 'Date': as.timeDate(x, zone = "", FinCenter = "") ## S3 method for class 'timeDate': as.timeDate(x, zone = x@FinCenter, FinCenter = "")

Arguments

x
an object of class timeDate.
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".

Value

  • as.timeDate.POSIXt returns an object of class timeDate. as.timeDate.Date returns an object of class timeDate.

Examples

Run this code
## timeDate - 
   tC = timeCalendar()
   
## Coerce a 'Date' object into a 'timeDate' object:
   as.timeDate(Sys.Date())

Run the code above in your browser using DataLab