metric_to_inches: Convert between standard metric units of measure for...

Description Usage Arguments Value Note Author(s) References See Also Examples

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

1
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

inches_to_metric

Examples

1
2
3
4
5
data(loveland)
loveland$Precip.in <- metric_to_inches(loveland$Precip.mm,
                                       unit.from = "mm",
                                       round = 2)
loveland

geanders/weathermetrics documentation built on May 17, 2019, 12:14 a.m.