formattable.Date: Create a formattable Date vector

Description Usage Arguments Value Examples

View source: R/formattable.R

Description

Create a formattable Date vector

Usage

1
2
## S3 method for class 'Date'
formattable(x, ..., formatter = "format.Date", preproc = NULL, postproc = NULL)

Arguments

x

a vector of class Date.

...

arguments to be passed to formatter.

formatter

formatting function, format.Date 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 Date vector

Examples

1
2
3
4
dates <- as.Date("2015-04-10") + 1:5
fdates <- formattable(dates, format = "%m/%d/%Y")
fdates
fdates + 30

Example output

[1] 04/11/2015 04/12/2015 04/13/2015 04/14/2015 04/15/2015
[1] 05/11/2015 05/12/2015 05/13/2015 05/14/2015 05/15/2015

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