powered by
Utility functions for checking formats and alignments.
is_valid_format(x, stop_otherwise = FALSE)check_aligns(algn)
check_aligns(algn)
is_valid_format returns TRUE if x is NULL, a supported format string, or a function, and FALSE otherwise.
is_valid_format
TRUE
x
NULL
FALSE
check_aligns returns TRUE if the provided alignments are supported, otherwise, an error is thrown.
check_aligns
(string or function) format string or an object returned by sprintf_format()
string
function
sprintf_format()
(flag) whether an error should be thrown if x is not a valid format.
flag
(character) a character vector that indicates the requested cell alignments.
character
is_valid_format("xx.x") is_valid_format("fakeyfake") check_aligns(c("decimal", "dec_right"))
Run the code above in your browser using DataLab