changeEatoRH | R Documentation |
This function converts values of Ea to RH. Note that the specified obs data frame must contain both Ea and air temperatures. For safety, CRHMr does not permit values of both RH and Ea in a data frame. The names of the variables containing air temperature and ea values must be of the form t.x
and ea.x
, respectively, where x
is an number, even if the column numbers are specified.
changeEatoRH(obs, t.cols = 1, ea.cols = 1, quiet = TRUE, logfile = "")
obs |
Required. A CRHMr data frame of observations. |
t.cols |
Optional. A vector containing the column numbers (not including the datetime) holding the air temperatures. If no columns are specified then the locations of the temperatures are guessed from the column names. The air temperatures must be in |
ea.cols |
Optional. A vector containing the column numbers (not including the datetime) holding the vapour pressures. If no columns are specified then the locations of the vapour pressures are guessed from the column name. The ea values must be in kPa. |
quiet |
Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, the function returns the original data frame with the ea columns converted to RH values in perceent. If unsuccessful, it returns the value FALSE
.
Kevin Shook
changeRHtoEa
# First, convert RH values to Ea
BadLake7376.ea <- changeRHtoEa(BadLake7376)
# now convert Ea values back to RH
BadLake7376.rh <- changeEatoRH(BadLake7376.ea)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.