metric_to_inches {weathermetrics} | R Documentation |
Convert between standard metric units of measure for precipitation to inches
Description
metric_to_inches
creates a numeric vector of precipitation measures in
inches from a numeric vector of precipitation in common metric units
(millimeters or centimeters).
Usage
metric_to_inches(metric, unit.from, round = 2)
Arguments
metric |
Numeric vector of precipitation (in millimeters or centimeters) |
unit.from |
A character string with the current units of the observations (i.e., the units from which you want to convert) |
round |
An integer indicating the number of decimal places to round the converted value. |
Value
A numeric vector of precipitation in inches.
Note
Equations are from the source code for the National Weather Service Forecast Office http://www.srh.noaa.gov/ama/?n=conversions
Author(s)
Joshua Ferreri joshua.m.ferreri@gmail.com, Brooke Anderson brooke.anderson@colostate.edu
References
http://www.srh.noaa.gov/ama/?n=conversions
See Also
Examples
data(loveland)
loveland$Precip.in <- metric_to_inches(loveland$Precip.mm,
unit.from = "mm",
round = 2)
loveland
[Package weathermetrics version 1.2.2 Index]