changeRHtoEa | R Documentation |
This function converts values of RH to Ea. CRHMr does not allow interpolation or imputation of RH values, so you must convert RH values to Ea before infilling. Note that the specified obs dataframe must contain both RH 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 RH values must be of the form t.x
and rh.x
, respectively, where x
is an number, even if the column numbers are specified.
changeRHtoEa(obs, t.cols = 1, rh.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 |
rh.cols |
Optional. A vector containing the column numbers (not including the datetime) holding the relative humidities. If no columns are specified then the locations of the RH values are guessed from the column names. |
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 RH columns converted to ea values in kPa. If unsuccessful, it returns the value FALSE
.
Kevin Shook
changeEatoRH
BadLake7376.ea <- changeRHtoEa(BadLake7376)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.