formattable.POSIXct: Create a formattable POSIXct vector

Description Usage Arguments Value Examples

View source: R/formattable.R

Description

Create a formattable POSIXct vector

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'POSIXct'
formattable(
  x,
  ...,
  formatter = "format.POSIXct",
  preproc = NULL,
  postproc = NULL
)

Arguments

x

a vector of class POSIXct.

...

arguments to be passed to formatter.

formatter

formatting function, format.POSIXct in default.

preproc

pre-processor function that prepares x for formatting function.

postproc

post-processor function that transforms formatted output for printing.

Value

a formattable POSIXct vector

Examples

1
2
3
4
times <- as.POSIXct("2015-04-10 09:30:15") + 1:5
ftimes <- formattable(times, format = "%Y%m%dT%H%M%S")
ftimes
ftimes + 30

Example output

[1] 20150410T093016 20150410T093017 20150410T093018 20150410T093019
[5] 20150410T093020
[1] 20150410T093046 20150410T093047 20150410T093048 20150410T093049
[5] 20150410T093050

formattable documentation built on Jan. 13, 2021, 7:17 a.m.