Learn R Programming

weathermetrics (version 1.2.2)

humidity.to.dewpoint: Calculate dew point temperature.

Description

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

Usage

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

Arguments

rh
Numeric vector of relative humidity (in %).
t
Numeric vector of air temperatures.
temperature.metric
Character string indicating the temperature metric of air temperature. Possible values are fahrenheit or celsius.

Value

A numeric vector of dew point temperature, in the same metric as the temperature vector (as specified by the temperature.metric option).

Details

Dew point temperature will be calculated in the same metric as the temperature vector (as specified by the temperature.metric option). If you'd like dew point temperature in a different metric, use the function celsius.to.fahrenheit or fahrenheit.to.celsius on the output from this function.

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

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

Examples

Run this code
# Calculate dew point temperature from relative humidity and
# air temperature.

data(newhaven)
newhaven$DP <- humidity.to.dewpoint(t = newhaven$TemperatureF,
                                    rh = newhaven$Relative.Humidity,
                                    temperature.metric = 'fahrenheit')
newhaven

Run the code above in your browser using DataLab