| calcAD | R Documentation |
Function to calculate air density based on temperature (°C), relative humidity in (%), and atmospheric pressure (hPa).
calcAD(Temp, RH, P_atm = 1013.25, R_dry = 287.058, R_vap = 461.495, ...)
Temp |
Temperature (°Celsius) |
RH |
Relative Humidity (0-100%) |
P_atm |
Atmospheric pressure = 1013.25 (hPa) |
R_dry |
Specific gas constant for dry air = 287.058 (J/(kg·K)) |
R_vap |
Specific gas constant for water vapor = 461.495 (J/(kg·K)) |
... |
Addtional arguments to supply to |
Air density in kg/m³
calcMR for calculating mixing ratio
calcAD for calculating air density
calcPw for calculating water vapour pressure
calcPws for calculating water vapour saturation pressure
# Air density at 20°C (Temp) and 50% relative humidity (RH)
calcAD(20, 50)
# mydata file
filepath <- data_file_path("mydata.xlsx")
mydata <- readxl::read_excel(filepath, sheet = "mydata", n_max = 5)
mydata |> dplyr::mutate(AirDensity = calcAD(Temp, RH))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.