Learn R Programming

⚠️There's a newer version (0.8-7) of this package.Take me there.

units (version 0.4-5)

Measurement Units for R Vectors

Description

Support for measurement units in R vectors; automatic propagation, conversion, derivation and simplification of units; raising errors in case of unit incompatibility. Compatible with the difftime class. Uses the UNIDATA udunits library and unit database for unit conversion and compatibility checking.

Copy Link

Version

Install

install.packages('units')

Monthly Downloads

328,156

Version

0.4-5

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Edzer Pebesma

Last Published

June 15th, 2017

Functions in units (0.4-5)

as.dt

convert units object into difftime object
as.units

convert object to a units object
install_conversion_constant

Install a function for conversion between user-defined units.
install_conversion_function

Install a function for conversion between user-defined units.
ud_units

List containing pre-defined units from the udunits2 package.
unitless

The "unit" type for vectors that are actually dimension-less.
make_unit

Create a new unit from a unit name.
parse_unit

parse unit in product power form (e.g. km m-2 s-1)
plot.units

create axis label with appropriate labels
type_sum.units

type_sum for tidy tibble printing
as_cf

deparse unit to string in product power form (e.g. km m-2 s-1)
hist.units

histogram for unit objects
Math.units

Mathematical operations for units objects
Ops.units

S3 Ops Group Generic Functions for units objects
units

Set measurement units on a numeric vector
units_options

set one or more units global options