inches_to_metric: Convert from inches to standard metric units of measure for...

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

Description

inches_to_metric creates a numeric vector of precipitation in common metric units (millimeters or centimeters) from a numeric vector of precipitation in inches.

Usage

1
inches_to_metric(inches, unit, round = 2)

Arguments

inches

Numeric vector of precipitation (in inches)

unit

Character specifying the metric precipitation unit besides inches. Possible values are:

  • mm: Millimeters

  • cm: Centimeters

round

An integer indicating the number of decimal places to round the converted value.

Value

A numeric vector of precipitation (in specified metric unit)

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

metric_to_inches

Examples

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

weathermetrics documentation built on May 2, 2019, 2:18 a.m.