# for a single value (or same length vectors)
q2rh(q = 0.0002038, t = 29.3, p = 100800)
# using all data.frames
times <- seq(as.POSIXct('2024-01-01',tz = 'UTC'),
as.POSIXct('2024-01-02',tz = 'UTC'),
by = 'hour')[1:5]
q2 <- data.frame(time = times, a = rep(0.0002038,5))
temp <- data.frame(time = times, a = rep( 29.3,5))
pres <- data.frame(time = times, a = rep( 100800,5))
q2rh(q = q2, t = temp, p = pres)
# using data.frame for q and t (p is cte.)
q2rh(q = q2, t = temp, p = 100000)
# using data.frame for q and p (t is cte.)
q2rh(q = q2, t = 26, p = pres)
# using data.frame only for q (p and t are cte.)
q2rh(q = q2, t = 26, p = 100000)
Run the code above in your browser using DataLab