convertUnits | R Documentation |
This function converts length and area values from one unit to another (e.g., meters to miles, or square yards to acres). Alternatively, it provides the conversion factor for changing one unit to another.
convertUnits(from = NULL, to = NULL, x = NULL)
from , to |
Character: Names of the units to convert from/to. Partial matching is used, and case is ignored. Valid values are listed below. The
|
x |
Numeric or |
expandUnits
, conversionFactors
# conversion
convertUnits(from = 'm', to = 'km', 250)
convertUnits(from = 'm', to = 'mi', 250)
convertUnits(from = 'm2', to = 'km2', 250)
# conversion factors
convertUnits(from = 'm', to = 'km')
convertUnits(from = 'm')
convertUnits(to = 'm')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.