tind-other: Conversion between 'tind' and Other Time Index...

tind-otherR Documentation

Conversion between tind and Other Time Index Representations

Description

Besides Date, POSIXct, and POSIXlt classes from package base, tind currently supports conversion between tind and the following classes: yearmon, yearqtr (both from package zoo), timeDate (from package timeDate), chron, dates, times (from package chron), and IDate, ITime (from package data.table).

Usage

## S3 method for class 'yearmon'
as.tind(x, ...)

as.yearmon(x, ...)

## S3 method for class 'yearqtr'
as.tind(x, ...)

as.yearqtr(x, ...)

## S3 method for class 'timeDate'
as.tind(x, digits = 0L, ...)

as.timeDate(x, ...)

## S3 method for class 'chron'
as.tind(x, digits = 0L, ...)

as.chron(x, ...)

## S3 method for class 'dates'
as.tind(x, ...)

as.dates(x, ...)

## S3 method for class 'times'
as.tind(x, digits = 0L, ...)

as.times(x)

## S3 method for class 'IDate'
as.tind(x, ...)

as.IDate(x, ...)

## S3 method for class 'ITime'
as.tind(x, ...)

as.ITime(x)

Arguments

x

an R object to be converted.

...

(ignored) further arguments passed to or from other methods.

digits

an integer value (0–6) determining the number of decimal places for seconds to be preserved during conversion (0 by default).

Details

Date-time indices resulting from conversion of chron objects always have time zone set to UTC. Use tzone<- or as.tzone methods when necessary.

Value

as.xxx returns an object of xxx class of the same length as the argument.

See Also

as.tind and tind-coercion for conversions to and from tind, date2num and num2date for conversion between tind and integer representations of dates (days since ...) found in different software packages.


tind documentation built on Dec. 28, 2025, 1:06 a.m.