R: Load a unit system

load_units_xml {units} | R Documentation

## Load a unit system

### Description

Load an XML database containing a unit system compatible with UDUNITS2.

### Usage

    load_units_xml(path = default_units_xml())

### Arguments

`path` | a path to a valid unit system in XML format.

### Details

A unit system comprises a root `<unit-system>` and a number of children defining prefixes (`<prefix>`) or units (`<unit>`). See the contents of

`system.file("share/udunits", package="units")`

for examples.

### Examples

    # load a new unit system
    load_units_xml(system.file("share/udunits/udunits2-base.xml", package="units"))
    ## Not run:
    set_units(1, rad) # doesn'twork

    ## End(Not run)

    # reload the default unit system
    load_units_xml()
    set_units(1, rad) # works again

[Package units version 0.7-0 Index]