| tind-coercion | R Documentation |
tind ClassObjects of tind class can be easily converted to built-in R classes
inluding numeric, integer, character, Date,
POSIXct, POSIXlt, and data.frame.
## S3 method for class 'tind'
as.integer(x, ...)
## S3 method for class 'tind'
as.double(x, ...)
## S3 method for class 'tind'
as.character(x, ...)
## S3 method for class 'tind'
as.Date(x, ...)
## S3 method for class 'tind'
as.POSIXct(x, tz = NULL, ...)
## S3 method for class 'tind'
as.POSIXlt(x, tz = NULL, ...)
## S3 method for class 'tind'
as.data.frame(x, ...)
x |
an object of |
... |
further arguments passed to or from other methods. |
tz |
(optional) a character value determining the time zone (the default
|
as.double and as.numeric return internal representation
for particular time index type (seconds, days, weeks etc. since ...).
For years, quarters, months, weeks, and dates, as.integer returns
representation in the form YYYY, YYYYQ, YYYYMM, YYYYWW,
and YYYYMMDD, respectively. For other index types, as.integer
returns internal representation of time indices converted to integer.
as.character returns character vector with standard (ISO 8601)
representation of time indices. For customisable output formats,
see format.
as.Date, as.POSIXct, and as.POSIXlt return objects
of classes Date, POSIXct, and POSIXlt, respectively.
as.data.frame returns a 1-column data frame with time indices and
allows to work with time indices in data frames.
as.xxx returns an object of xxx class of the same
length as the argument. as.data.frame returns a data frame with a single
column and the number of rows equal to the length of the argument.
format for customisable character output formats,
as.tind for conversion to tind.
For conversions between tind class and other classes (from packages
other than base), see tind-other.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.