Description Usage Arguments Details Value
View source: R/utils-data-processing.R
Insert rows if necessary so that time series are evenly sampled
1 2 3 4 5 6 7 | make_equitimed(
data,
period = NULL,
tol = 1e-06,
method = c("mean", "method", "closest"),
na.rm = TRUE
)
|
data |
dataset to modify |
period |
period to check the times against (if |
tol |
tolerance for the period |
method |
one of |
na.rm |
a logical value indicating whether |
First, get_full_times()
computes the sequence of time index values
at a regular sampling interval of period. These will be the final time
index values for the output. Some set of rows of the original dataset
will map to each of these time indices.
The method
argument determines how these rows get coerced:
the values in the rows are averaged together using mean
the values in the rows are averaged together using median
the values in the row that is closest in time to the desired time index are used.
the dataset, with rows coerced according to the equitimed time indices, and additional empty rows inserted if needed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.