convert_quantities | R Documentation |
Generic function to convert a numeric vector from one scale of measurement to another.
convert_quantities(x, from, to)
Relies on the nifty units
package.
vignette("units", package = "units")
convert_quantities(1, "ton", "lbs") # mass convert_quantities(100, "tons/day", "lbs/yr") # mass rate convert_quantities(1, "yard^3", "ft^3") # volume convert_quantities(212, "degF", "degC") # temperature
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.