average_by_time: Average By Time

Description Usage Arguments Author(s)

View source: R/func_average_by_time.R

Description

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

Usage

1
2
average_by_time(df, time_stamp = c("floor", "round", "ceiling")[1],
  res = "1 min", .f = mean, time_col = "date", ...)

Arguments

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

Author(s)

W. S. Drysdale


willdrysdale/wsdmiscr documentation built on Feb. 13, 2020, 1:03 p.m.