powered by
Determine whether a unit string is parseable and recognized by the udunits library.
ud.is.parseable(unit.string)
Returns a logical: True if the units is parseable and recognized by the udunits library, False otherwise.
True
False
A character string representing a type of units which may be parseable by the udunits library
James Hiebert hiebert@uvic.ca
ud.is.parseable uses udunit's function ut_parse to determine whether or not the given unit string is parseable. If ut_parse returns NULL, then ud.is.parseable will return FALSE.
ud.is.parseable
ut_parse
FALSE
Unidata's udunits reference: https://www.unidata.ucar.edu/software/udunits/ API guide for ut_parse: https://docs.unidata.ucar.edu/udunits/current/udunits2lib.html#ut_parse
ud.are.convertible
ud.is.parseable("K") # TRUE ud.is.parseable(" K ") # TRUE ud.is.parseable("miles") # TRUE ud.is.parseable("Not parseable") # FALSE
Run the code above in your browser using DataLab