Skip to contents

Checks if something is parseable as units. Tests against the udunits library in units. See as_units. See also install_unit for finer control.

Usage

# Default S3 method
is_parseable(x, ...)

Arguments

x

character

...

passed arguments

Value

logical

Examples

is_parseable(c('kg/m2','kg/m^2','kg.m/s2','µg/L'))
#> [1] TRUE TRUE TRUE TRUE
is_parseable('foo')
#> [1] FALSE
library(units)
install_unit('foo')
is_parseable('foo')
#> [1] TRUE