View source: R/func_average_by_time.R
average_by_time | R Documentation |
Function used to average data to new time resolution using the dplyr grouping. It is an attempt to be more efficent than
openair::timeAverage to be used when dealing with unusually large datasets. It is certainly nowhere near as robust.
Use at your own risk
average_by_time(
df,
time_stamp = c("floor", "round", "ceiling")[1],
res = "1 min",
.f = mean,
time_col = "date",
...
)
df |
data.frame |
time_stamp |
"floor" "round" or "ceiling". How is the time_stamp rounded to the resolution? conside the implication on the resulting timestamp. Floor is default, giving a timestamp that referes to the begining of the averaging period |
res |
time resolution to round to. Use lubridate "unit" format. Default "1 min" |
.f |
function to use when using summarise_all. default mean |
time_col |
what column contains the time information, default date |
... |
extra arguments to pass to .f |
W. S. Drysdale
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.