Title: | Convert Between Units |
---|---|
Description: | Provides conversion functionality between a broad range of scientific, historical, and industrial unit types. |
Authors: | Gordon Shotwell [aut, cre] |
Maintainer: | Gordon Shotwell <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1 |
Built: | 2024-10-26 03:24:40 UTC |
Source: | https://github.com/gshotwell/convertr |
This table provides the conversion factors for convert
.
The conversion factor is broken into four componts: A, B, C, and D. Units are
converted from the origin unit (X) to the respective SI base unit (BU)
using the following formula:
The data orginates from the POSC Units of Measure Dictionary v2.2 and Wikipedia
conversion_table
conversion_table
A data frame with 1511 rows and 11 variables:
name: Name of the origin unit
quantity_type: Description of what the unit is used to measure
catalog_name: Origin of unit specification
catelog_symbol: Symbol for the unit
rp66_symbol: Recomended Practice 66 unit
base_unit: Equivalent System Internationale (SI) base unit
a: Conversion factor
b: Conversion factor
c: Conversion factor
d: Conversion factor
multi_unit: Can the unit be converted to other units?
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.
convert(vector, origin, target)
convert(vector, origin, target)
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. |
A numeric vector
convert(1:20, "kg", "g") convert(1:20, "galUK/min.ft2", "kft/s") ## Not run: convert(1:20, "kg", "km2") ## End(Not run)
convert(1:20, "kg", "g") convert(1:20, "galUK/min.ft2", "kft/s") ## Not run: convert(1:20, "kg", "km2") ## End(Not run)
It's often difficult to remember the symbol for the units you
want to convert.This gadget shows which units can be converted to one anohter,
and provides an example calculation on a sample vector
On exit you can either return a valid convert()
call or a
converted numeric vector.
convert_gadget(vector, return_value = FALSE)
convert_gadget(vector, return_value = FALSE)
vector |
A numeric vector to convert. You can change the vector within the app. |
return_value |
By default the gadget generates a |
Insert output text into editor.
## Not run: convert_gadget() convert_gadget(mtcars$mpg) ## End(Not run)
## Not run: convert_gadget() convert_gadget(mtcars$mpg) ## End(Not run)
A shiny application that lets you take a look at the
conversion_table
dataframe.
explore_units()
explore_units()
Launches a Shiny app
## Not run: explot_units() ## End(Not run)
## Not run: explot_units() ## End(Not run)
A convenience function to return conversion_table
get_conversion_table()
get_conversion_table()
Conversion table dataframe
a <- get_conversion_table()
a <- get_conversion_table()