fillup | R Documentation |
Based on the time series given in "tseries" a new time series is generated in which timestamps that are lacking in tseries are included. Optionally missing values are generated by interpolation between existing values.
fillup( tseries, tsField, step_s, forceStep, interpol, includeOrig, default = NA, dbg = FALSE )
tseries |
data frame representing a time-series of values |
tsField |
Name of timestamp column in tseries. Default: name of first available POSIXt-column |
step_s |
Time step in seconds that shall lie between consecutive timestamps. Non-existing timestamps are generated. |
forceStep |
If TRUE, only timestamps that are multiples of the time step given in step_s are put into the result data frame |
interpol |
if TRUE, the returned data frame will for each value column contain a corresponding column containing interpolated values |
includeOrig |
if TRUE and interpol = TRUE the original columns will remain in the output in addition to the columns containing all (original plus interpolated) values. |
default |
value to be used if there are not enough (at least to) non-NA values to be used for interpolation. Default: NA |
dbg |
If TRUE, debug messages are shown |
Returns a data.frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.