Closed anadiedrichs closed 5 years ago
The reason I receive this warning is when RH is a vector but I'm comparing it with a scalar. R automatically takes the first element of the vector.
A reproducible example
source('~/phd-repos/tmin/frost/R/dewPoint.R') RH <- rnorm(100, mean = 50,sd=10) temperature <- rnorm(100,mean = 10,sd=5) out <- calcDewPoint.B(RH, temperature)
shows this warning:
Warning message: In if (RH < 50) { : the condition has length > 1 and only the first element will be used
`