convert.units: Converting units

Description Usage Arguments Details Value Author(s) Examples

View source: R/ConvertUnits.r

Description

Converts units (to SI equivalents by default)

Usage

1
2
convert.units(x, tounit = c("kg", "s", "m", "m3", "J", "W", "A", 
    "V", "C", "N", "Pa", "Hz", "mol"), fromunit = NULL)

Arguments

x

numeric vector with values to be converted

tounit

character vector of the new units to be used

fromunit

character vector or factor with the current units

Details

Uses the table in en.opasnet.org/w/Unit_conversions for the conversions, which can be edited to contain relevant units.

See also: http://en.opasnet.org/

Value

Returns a data.frame

Author(s)

J. Tuomisto jouni.tuomisto@thl.fi

Examples

1
2
3
4
## Not run: 
convert.units(1, tounit = c("pg", "l"), fromunit = "ug /m3")

## End(Not run)

OpasnetUtils documentation built on May 2, 2019, 12:39 p.m.