| calcRH_AH | R Documentation |
Function to calculate relative humidity (%) from temperature (°C) and absolute humidity (g/m^3)
calcRH_AH(Temp, AH, P_atm = 1013.25)
Temp |
Temperature (°Celsius) |
AH |
Absolute Humidity (g/m³) |
P_atm |
Atmospheric pressure = 1013.25 (hPa) |
Relative Humidity (0-100%)
Buck, A. L. (1981). New equations for computing vapor pressure and enhancement factor. Journal of Applied Meteorology, 20(12), 1527-1532.
calcAH for calculating absolute humidity
calcTemp for calculating temperature
calcRH_DP for calculating relative humidity from dew point
calcDP for calculating dew point
# Relative humidity (RH) at temperature of 20°C (Temp) and absolute humidity of 8.645471 g/m³ (AH)
calcRH_AH(20, 8.630534)
calcRH_AH(20, calcAH(20, 50))
# mydata file
filepath <- data_file_path("mydata.xlsx")
mydata <- readxl::read_excel(filepath, sheet = "mydata", n_max = 5)
mydata |> dplyr::mutate(Abs = calcAH(Temp, RH), RH2 = calcRH_AH(Temp, Abs))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.