convert_to_base {units}R Documentation

Convert units to their base units

Description

Convert the units of a units object to their base units, as defined by the udunits database (SI units).

Usage

convert_to_base(x, simplify = TRUE, keep_fraction = TRUE)

Arguments

x

object of class units.

simplify

logical; if TRUE (default), the resulting units are simplified.

keep_fraction

logical; if TRUE (default), the result is kept as a fraction.

Value

object of class units with units converted to base units.

Examples

x <- set_units(32, mJ/g)
convert_to_base(x)
convert_to_base(x, keep_fraction=FALSE)
convert_to_base(x, simplify=FALSE)
convert_to_base(x, simplify=FALSE, keep_fraction=FALSE)

[Package units version 1.0-0 Index]