rapistrptime: R Wrappers for 'strptime', 'asPOSIXlt' etc

Description Usage Arguments Details Value Author(s) Examples

Description

Wrappers for C-level strptime etc functions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rapistrptime(x, fmt, tz = "")

rapiAsPOSIXlt(x, tz = "")

rapiAsPOSIXct(x, tz = "")

rapiFormatPOSIXlt(x, fmt, usetz = FALSE)

rapiPOSIXlt2D(x)

rapiD2POSIXlt(x)

Arguments

x

Vector with one or character elements to be parsed

fmt

The format string, see help("strptime") for details.

tz

An optional timezone string

usetz

An optional logical variable selecting use of the timezone.

Details

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

Value

A vector with POSIXlt datetime objects

Author(s)

Dirk Eddelbuettel

Examples

1
2
3
4
5
6
7
8
9
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"))

RApiDatetime documentation built on May 2, 2019, 4:16 a.m.