get_tplyr_regex {Tplyr}R Documentation

Retrieve one of Tplyr's regular expressions

Description

This function allows you to extract important regular expressions used inside Tplyr.

Usage

get_tplyr_regex(rx = c("format_string", "format_group"))

Arguments

rx

A character string with either the value 'format_string' or 'format_group'

Details

There are two important regular expressions used within Tplyr. The format_string expression is the expression to parse format strings. This is what is used to make sense out of strings like 'xx (XX.x%)' or 'a+1 (A.a+2)' by inferring what the user is specifying about number formatting.

The 'format_group' regex is the opposite of this, and when given a string of numbers, such as ' 5 (34%) [9]' will return the separate segments of numbers broken into their format groups, which in this example would be ' 5', '(34%)', and '[9]'.

Value

A regular expression object

Examples


get_tplyr_regex('format_string')

get_tplyr_regex('format_group')


[Package Tplyr version 1.2.1 Index]