# load a new unit system
load_units_xml(system.file("share/udunits/udunits2-base.xml", package="units"))
if (FALSE) {
set_units(1, rad) # doesn'twork
}
# reload the default unit system
load_units_xml()
set_units(1, rad) # works again
Run the code above in your browser using DataLab