check_formats {formatters} | R Documentation |
Check if a format or alignment is supported
Description
Utility functions for checking formats and alignments.
Usage
is_valid_format(x, stop_otherwise = FALSE)
check_aligns(algn)
Arguments
x |
( |
stop_otherwise |
( |
algn |
( |
Value
-
is_valid_format
returnsTRUE
ifx
isNULL
, a supported format string, or a function, andFALSE
otherwise.
-
check_aligns
returnsTRUE
if the provided alignments are supported, otherwise, an error is thrown.
Note
If x
is a function, no check is performed to verify that it returns a valid format.
Examples
is_valid_format("xx.x")
is_valid_format("fakeyfake")
check_aligns(c("decimal", "dec_right"))
[Package formatters version 0.5.8 Index]