Learn R Programming

formatters (version 0.5.0)

is_valid_format: Check if a format is supported

Description

Check if a format is supported

Usage

is_valid_format(x, stop_otherwise = FALSE)

Value

TRUE if x is NULL, a supported format string, or a function; FALSE otherwise.

Arguments

x

either format string or an object returned by sprintf_format

stop_otherwise

logical, if x is not a format should an error be thrown

Examples

Run this code
is_valid_format("xx.x")
is_valid_format("fakeyfake")

Run the code above in your browser using DataLab