opts_POSIXct | R Documentation |
These options will be used on objects of class 'POSIXct'.
opts_POSIXct(
constructor = c("as.POSIXct", ".POSIXct", "as_datetime", "as.POSIXct.numeric",
"as_datetime.numeric", "next", "atomic"),
...,
origin = "1970-01-01"
)
constructor |
String. Name of the function used to construct the object, see Details section. |
... |
Additional options used by user defined constructors through the |
origin |
Origin to be used, ignored when irrelevant. |
Depending on constructor
, we construct the object as follows:
"as.POSIXct"
(default): Build the object using a as.POSIXct()
call on a
character vector.
".POSIXct"
: Build the object using a .POSIXct()
call on a numeric vector.
"as_datetime"
: Build the object using a lubridate::as_datetime()
call on
a character vector.
"next"
: Use the constructor for the next supported class. Call .class2()
on the object to see in which order the methods will be tried.
"atomic"
: We define as an atomic vector and repair attributes.
If the data is not appropriate for a constructor we fall back to another one
appropriately. In particular corrupted POSIXct objects such as those defined
on top of integers (or worse) are all constructed with the ".POSIXct"
constructor.
An object of class <constructive_options/constructive_options_POSIXct>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.