are_all_area_or_dist | R Documentation |
Tests if input can be safely converted to distance or to area values.
are_all_area_or_dist(input, error = FALSE)
are_all_dist(input, error = FALSE)
input |
Character vector. Elements must match the requirements of
the |
Logical vector of the same length as input and/or an error if verbose
is TRUE
.
Only returns TRUE
if all values are valid distance inputs
or all values are valid area inputs.
are_all_area_or_dist(c("2mm", "2cm", "3px", "4.5mm2")) # TRUE
are_all_area_or_dist(c("2mm", "2CCm", "3px", "4.5mm2")) # FALSE
are_all_area_or_dist(c("2mm", "2CCm", "3px", "4.5mm2"), error = T) # FALSE -> error
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.