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

parameters

Parameters 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_datatype

Arguments passed to self$set_parameters, optional.


Method aggregate()

Aggregates the given input and returns samples.

Usage
aggregator$aggregate(x, y, n_out)
Arguments
x, y

Indexes and values that has to be aggregated.

n_out

Integer 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_gaps

Boolean, 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_position

Character, 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_gap

Numeric, optional. The coefficient to detect irregular gaps. By default, 3.0.

accepted_datatype

Character, 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
deep

Whether to make a deep clone.


[Package shinyHugePlot version 0.2.6 Index]