View source: R/distributeInst.R
distributeInst | R Documentation |
Distributes instantaneous values to a shorter time interval. The missing datetimes are i nserted and then the values are interpolated. This function is typically used to downscale obs values such as t, ea, and u.
distributeInst(
obs,
obsCols = "all",
timeStep = 0,
interpolationMethod = "linear",
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. |
interpolationMethod |
Optional. A vector containing the methods to be used for interpolation for each of the variables. Currently supported methods are linear and spline. The default is to use linear interpolation. If fewer methods than columns are specified, the methods are recycled. |
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
distributeMean
## Not run:
hourly_vals <- distributeInst(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.