simplifyUnit: Simplify units by removing repeated units from the numerator...

View source: R/units.R

simplifyUnitR Documentation

Simplify units by removing repeated units from the numerator and denominator

Description

Simplify units by removing repeated units from the numerator and denominator

Usage

simplifyUnit(numerator = "", denominator = "")

Arguments

numerator

The numerator of the units (or the whole unit specification)

denominator

The denominator of the units (or NULL if numerator is the whole unit specification)

Details

NA or "" for numerator and denominator are considered unitless.

Value

The units specified with units that are in both the numerator and denominator cancelled.

See Also

Other Unit conversion: modelUnitConversion()

Examples

simplifyUnit("kg", "kg/mL")
# units that don't match exactly are not cancelled
simplifyUnit("kg", "g/mL")

nlmixr2/babelmixr documentation built on Nov. 21, 2024, 3:16 a.m.