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
unitbundle objects) also obey rules relevant to units propagation,
but be warned - the rules are slightly different for
objects than they are for
unitted objects. See Details |
Arithmetic on unitbundles.
## S4 method for signature 'unitbundle,unitbundle' Arith(e1, e2)
the first unitbundle
the second unitbundle
The rules for operations on unitbundles are described in the following subsections.
Returns the original units of e1, which are unchanged by these unary operations.
e1 and e2 are required to contain identical units (an error is thrown otherwise); the units of e1 (or, equivalently, e2) are returned unaltered.
Returns a new unitbundle containing the union (product) of all units in e1 and e2.
Returns a new unitbundle with the units of e1 in the numerator and the units of e2 in the denominator.
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.
Returns the units of e1 regardless of the units of e2.
Returns the same units as e1/e2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.