Description Usage Arguments Details See Also

When data with units are combined by arithmetic operations, the units ought
to be propagated through according to standard rules. Data that are
`unitted`

obey these rules. To make this possible, the units themselves
(as `unitbundle`

objects) also obey rules relevant to units propagation,
but be warned - the rules are slightly different for `unitbundle`

objects than they are for `unitted`

objects. See **Details |
Arithmetic on unitbundles**.

1 2 | ```
## S4 method for signature 'unitbundle,unitbundle'
Arith(e1, e2)
``` |

`e1` |
the first unitbundle |

`e2` |
the second unitbundle |

The rules for operations on unitbundles are described in the following subsections.

- +e1, -e1, !e1
Returns the original units of e1, which are unchanged by these unary operations.

- e1+e2, e1-e2
e1 and e2 are required to contain identical units (an error is thrown otherwise); the units of e1 (or, equivalently, e2) are returned unaltered.

- e1*e2
Returns a new unitbundle containing the union (product) of all units in e1 and e2.

- e1/e2
Returns a new unitbundle with the units of e1 in the numerator and the units of e2 in the denominator.

- e1^e2
Requires that e2 contain no units; the new units must be calculated with respect to the data attached to e2 but cannot be calculated here because the data are unavailable to unitbundles themselves. The units of e1 are returned.

- e1%%e2
Returns the units of e1 regardless of the units of e2.

- e1%/%e2
Returns the same units as e1/e2.

`unitbundle`

for the `unitbundle`

class;
`unitted`

for data with unitbundles attached

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.