Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

install_symbolic_unit

Define new symbolic units


Description

Adding a symbolic unit allows it to be used in as_units, make_units and set_units. No installation is performed if the unit is already known by udunits.

Usage

install_symbolic_unit(name, warn = TRUE, dimensionless = TRUE)

remove_symbolic_unit(name)

Arguments

name

a length 1 character vector that is the unit name or symbol.

warn

warns if the supplied unit symbol is already a valid unit symbol recognized by udunits.

dimensionless

logical; if TRUE, a new dimensionless unit is created, if FALSE a new base unit is created. Dimensionless units are convertible to other dimensionless units (such as rad), new base units are not convertible to other existing units.

Details

install_symbolic_unit installs a new dimensionless unit; these are directly compatible to any other dimensionless unit. To install a new unit that is a scaled or shifted version of an existing unit, use install_conversion_constant or install_conversion_offset directly.ç


units

Measurement Units for R Vectors

v0.7-1
GPL-2
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Thomas Mailund [aut], Tomasz Kalinowski [aut], James Hiebert [ctb], Iñaki Ucar [aut] (<https://orcid.org/0000-0001-6403-5550>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.