A base class for the aggregation, which defines the structure of the class and is not available on a stand-alone basis.
An R6::R6Class object
parametersParameters for the aggregation, returned as a named list. Generate a matrix using x and n_out Apply function for nanotime
new()Constructor of aggregator
aggregator$new(
...,
interleave_gaps = FALSE,
NA_position = "begin",
coef_gap = 3
)...Not used.
interleave_gaps, NA_position, coef_gapArguments passed to self$set_parameters, optional.
aggregate()Aggregates the given input and returns samples.
aggregator$aggregate(x, y, n_out, db = NULL)x, yIndexes and values that has to be aggregated.
n_outInteger or numeric.
dbCharacter. The duck-db that contains the x-y data. The number of samples that the aggregated data contains.
set_parameters()Setting of the parameters for the aggregation
aggregator$set_parameters(..., interleave_gaps, NA_position, coef_gap)...Not used.
interleave_gapsBoolean, optional.
Whether NA values should be added
when there are gaps / irregularly sampled data.
Irregular gaps between samples are determined whether the gap is larger than
the median of the sample gaps times the coefficient for detecting irregular gaps.
By default, FALSE.
NA_positionCharacter, optional.
Indicates where NAs are placed when gaps are detected.
If "end", the first point after a gap will be replaced.
If "begin", the last point before a gap will be replaced.
If "both", both the encompassing gap data points are replaced.
This parameter is only effective when interleave_gaps == TRUE.
By default, "begin".
coef_gapNumeric, optional. The coefficient to detect irregular gaps. By default, 3.0.
accepted_datatypeCharacter, optional.
This parameter indicates the supported data classes.
If all data classes are accepted, set it to NULL.
clone()The objects of this class are cloneable with this method.
aggregator$clone(deep = FALSE)deepWhether to make a deep clone.