View source: R/distributeMean.R
distributeMean | R Documentation |
Distributes mean values to a shorter time interval. The missing datetimes are inserted and then the values are repeated. This function is typically used to downscale obs values such as t, ea, and u.
distributeMean(
obs,
obsCols = "all",
timeStep = 0,
maxLength = 5,
quiet = TRUE,
logfile = ""
)
obs |
Required. The CRHMr data frame of obs values. |
obsCols |
Optional. A vector containing the columns to be imputed in the obs data frame, not including the datetime. The default all specifies all columns. |
timeStep |
Required. The time step (in hours) for the interpolated values. This value must be smaller than the time step in the original time series. |
maxLength |
Optional. The maximum gap length to be interpolated. Defaults to 5 time steps. |
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 use |
If successful, returns a dataframe of the selected columns interpolated to the specified time step. If unsuccessful, returns an error.
Kevin Shook
distributeInst
## Not run:
hourly_vals <- distributeMean(vegreville, c(1,2,3), timeStep = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.