convert {convertr}R Documentation

Convert from one unit type to another

Description

Converts numeric vectors from one unit to another Approximately 1500 units are available. convert_gadget can help you build valid convert() expressions and explore_units provides an interface for exploring the conversion_table which underlies the computation.

Usage

convert(vector, origin, target)

Arguments

vector

A numeric vector to be converted

origin

The catalog symbol of the current unit.

target

The catalog symbol of unit you want to convert to.

Value

A numeric vector

Examples

convert(1:20, "kg", "g")
convert(1:20, "galUK/min.ft2", "kft/s")
## Not run: 
convert(1:20, "kg", "km2")

## End(Not run)


[Package convertr version 0.1 Index]