formatoR2regex: Convert FormatoR to regex.

Description Usage Arguments Value Examples

View source: R/formatoR2regex.R

Description

formatoR2regex cnverts FormatoR to regex. FormatoR is a specification for a fwf schema according to an internal standard in the Spanish National Statistics Institute (2020).

This standard specifies character, integer and float types by the letters A, I and F, respectively. The width of the string is specified with a number. In the case of float numbers, .d specifies the number of decimal digits after the decimal point. See example below

Usage

1
formatoR2regex(formatoR)

Arguments

formatoR

character vector with the formatoR specification for the string widths.

Value

Return a character vector with regular expressions for each component of the input vector.

Examples

1
2
formatoR <- c('A2', 'I5', 'F5.2')
formatoR2regex(formatoR)

david-salgado/fastReadfwf documentation built on Dec. 25, 2021, 12:43 p.m.