rapistrptime | R Documentation |
strptime
, asPOSIXlt
etcWrappers for C-level strptime
etc functions
rapistrptime(x, fmt, tz = "") rapiAsPOSIXlt(x, tz = "") rapiAsPOSIXct(x, tz = "") rapiFormatPOSIXlt(x, fmt, usetz = FALSE) rapiPOSIXlt2D(x) rapiD2POSIXlt(x)
x |
Vector with one or character elements to be parsed |
fmt |
The format string, see |
tz |
An optional timezone string |
usetz |
An optional logical variable selecting use of the timezone. |
These functions provide (additional) entry points from R to the C-level function of the R API. They are provided here mainly for testing (the C level access) as R itself exposes the function
A vector with POSIXlt
datetime objects
Dirk Eddelbuettel
op <- options(digits.secs=6) x <- rapistrptime("2017-01-02 03:04:05.678", "%Y-%m-%d %H:%M:%OS") format(x) rapiAsPOSIXlt(as.POSIXct(x)) rapiAsPOSIXct(x) rapiFormatPOSIXlt(x, "%Y-%b-%d %H:%M:%OS") options(op) rapiPOSIXlt2D(x) rapiD2POSIXlt(as.Date("2017-01-02"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.