unitconv: Calculate unit conversion factors

Description Usage Arguments Functions

Description

Return a factor for converting the input unit to the output unit. This factor should be applied as a multiplier: out = in * fac. In the event the conversion could not be performed (e.g., because one of the units couldn't be identified), NA will be returned (we return NA instead of NULL so that you can multiply several conversion factors and check once at the end whether they all succeeded).

Usage

1
2
3
4
5
unitconv_counts(iunit, ounit, inverse = FALSE)

unitconv_energy(iunit, ounit, inverse = FALSE)

unitconv_usdollar(iunit, ounit, inverse = FALSE)

Arguments

iunit

Units for the input data

ounit

Desired output unit.

inverse

If TRUE invert the conversion factor. Use this in cases where the unit being converted is in the denominator; e.g. cost/EJ -> cost/MWh.

Functions


JGCRI/iamrpt documentation built on June 30, 2019, 3:19 a.m.