Description Usage Arguments Functions
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).
1 2 3 4 5 | unitconv_counts(iunit, ounit, inverse = FALSE)
unitconv_energy(iunit, ounit, inverse = FALSE)
unitconv_usdollar(iunit, ounit, inverse = FALSE)
|
iunit |
Units for the input data |
ounit |
Desired output unit. |
inverse |
If |
unitconv_counts
: Convert counting units (thousands, millions, etc.)
Supported units are described in parsecounts
.
unitconv_energy
: Convert energy units
Supported units: EJ, TJ, MJ, MWh
unitconv_usdollar
: Adjust US Dollar units for inflation.
Convert US dollar units from one dollar year to another using the GDP deflator obtained from the Federal Reserve's FRED database.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.