Learn R Programming

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

units (version 0.4-1)

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

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Edzer Pebesma

Last Published

December 9th, 2016

Functions in units (0.4-1)

as.units

convert object to a units object
as.units.difftime

convert difftime objects to units
parse_unit

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

S3 Ops Group Generic Functions for units objects
as.dt

convert units object into difftime object
type_sum.units

type_sum for tidy tibble printing
unitless

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

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

set one or more units global options
units.units

retrieve measurement units from units object
units<-.numeric

Set measurement units on a numeric vector
units

Convert units
Math.units

Mathematical operations for units objects
make_unit

Create a new unit from a unit name.
as_cf

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

histogram for unit objects
plot.units

create axis label with appropriate labels