Description Details Slots See Also Examples
A unitted object is a data object - a vector, data.frame, array, etc. - and
its associated units. These units will be propagated through addition,
multiplication, and many other common operations on data. Unitted objects are
created by calling unitted() or u(), and the data
can be retrieved by calling deunitted() or v().
Units can be extracted as character strings with get_units().
Most of the time, you'll find that unitted objects can do everything that
their un-unitted data could do, but with smart units to make your analyses
more readable and less vulnerable to typos or omissions.
Every unitted object contains a .Data 'slot', though this is not formally recognized as such in the documentation.
unitsThe units. Depending on the .Data type, the units slot may
contain a single units bundle (e.g., "kg ha^-1"), a matrix or array of
bundles, or a list of bundles. Any of these may be retrieved with
get_units.
unitted for class and subclass construction,
deunitted for recovering the data from the unitted object,
and unitted_Ops for smart units behaviors.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.