| aggregator {shinyHugePlot} | R Documentation |
R6 base class for the aggregation
Description
A base class for the aggregation, which defines the structure of the class and is not available on a stand-alone basis.
Format
An R6::R6Class object
Active bindings
parametersParameters for the aggregation, returned as a named list. Generate a matrix using x and n_out Apply function for nanotime
Methods
Public methods
Method new()
Constructor of aggregator
Usage
aggregator$new( ..., interleave_gaps = FALSE, NA_position = "begin", coef_gap = 3, accepted_datatype = NULL )
Arguments
...Not used.
interleave_gaps, NA_position, coef_gap, accepted_datatypeArguments passed to
self$set_parameters, optional.
Method aggregate()
Aggregates the given input and returns samples.
Usage
aggregator$aggregate(x, y, n_out)
Arguments
x, yIndexes and values that has to be aggregated.
n_outInteger or numeric. The number of samples that the aggregated data contains.
Method set_parameters()
Setting of the parameters for the aggregation
Usage
aggregator$set_parameters( ..., interleave_gaps, NA_position, coef_gap, accepted_datatype )
Arguments
...Not used.
interleave_gapsBoolean, optional. Whether
NAvalues 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 wheninterleave_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.
Method clone()
The objects of this class are cloneable with this method.
Usage
aggregator$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.