Generalised aggregation function generates distinct epochs or events outputs based on the initial parameters provided.
aggregate_periods(
time_series,
measure = "AGSA",
time = "timestamp",
sample_frequency,
duration = NA,
first_epoch_timestamp = NA,
events = NA,
start_time = "start",
end_time = "end",
fun = mean
)Data frame of aggregated epochs or events.
Data frame to be aggregated.
Name of the measure columns to be included.
Name of the time column.
Frequency of data.
Time duration to aggregate in each epoch.
Time to start the first epoch, defaults to first record.
Data frame containing the start and end index of each event.
Name of the column in events containing the start index of the events.
Name of the column in events containing the end index of the events.
Function to apply on aggregation, defaults to mean.