formatter: Formatters

Description Usage Arguments Value Examples

Description

Get or set the formatter for a parser

Usage

1
2
3
formatter(x)

formatter(x) <- value

Arguments

x

parser

value

formatter function to be set

Value

The formatter attribute (should be a function) for the passed object (usually a parser object)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
p <- parser('[0-9]+]')

# Default formatter
formatter(p)

# Set formatter
formatter(p) <- as.integer

# Custom formatter
formatter(p)

tabulog documentation built on Aug. 9, 2019, 5:07 p.m.