ud_are_convertible | R Documentation |
Parses and checks whether units can be converted by UDUNITS-2. Units may not be convertible either because they are different magnitudes or because one (or both) units are not defined in the database.
ud_are_convertible(x, y)
x |
character or object of class |
y |
character or object of class |
boolean, TRUE
if both units exist and are convertible.
ud_are_convertible("m", "km")
a <- set_units(1:3, m/s)
ud_are_convertible(units(a), "km/h")
ud_are_convertible("s", "kg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.