dewpoint.to.humidity: Calculate relative humidity.

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

Description

dewpoint.to.humidity creates a numeric vector of relative humidity from numerical vectors of air temperature and dew point temperature.

Usage

1
dewpoint.to.humidity(dp = NA, t = NA, temperature.metric = "fahrenheit")

Arguments

dp

Numeric vector of dew point temperatures.

t

Numeric vector of air temperatures.

temperature.metric

Character string indicating the temperature metric of air temperature and dew point temperature. Possible values are fahrenheit or celsius.

Details

Dew point temperature and temperature must be in the same metric (i.e., either both in Celsius or both in Fahrenheit). If necessary, use convert_temperature to convert before using this function.

Value

A numeric vector of relative humidity (in %)

Note

Equations are from the source code for the US National Weather Service's online heat index calculator.

Author(s)

Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com

References

National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.

See Also

humidity.to.dewpoint, fahrenheit.to.celsius, celsius.to.fahrenheit, convert_temperature

Examples

1
2
3
4
5
6
7
8
# Calculate relative humidity from air temperature and
# dew point temperature.

data(lyon)
lyon$RH <- dewpoint.to.humidity(t = lyon$TemperatureC,
                                dp = lyon$DewpointC,
                                temperature.metric = 'celsius')
lyon

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