Learn R Programming

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

units (version 0.4-2)

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-2

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Edzer Pebesma

Last Published

January 13th, 2017

Functions in units (0.4-2)

plot.units

create axis label with appropriate labels
Ops.units

S3 Ops Group Generic Functions for units objects
parse_unit

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

Mathematical operations for units objects
as_cf

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

convert object to a units object
units<-.numeric

Set measurement units on a numeric vector
units

Convert units
type_sum.units

type_sum for tidy tibble printing
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.
units.units

retrieve measurement units from units object
units_options

set one or more units global options
as.dt

convert units object into difftime object
as.units.difftime

convert difftime objects to units
hist.units

histogram for unit objects