Learn R Programming

shinyHugePlot (version 0.3.0)

range_stat_aggregator: Aggregation which returns the ranges and nominal values within small data ranges

Description

This aggregator divides the data into no-overlapping intervals and calculate specific statistics that represents the range and nominal values of the data, such as the max, min and mean.

Arguments

Format

An R6::R6Class object

Super classes

shinyHugePlot::aggregator -> shinyHugePlot::rng_aggregator -> range_stat_aggregator

Methods

Inherited methods


Method new()

Constructor of the aggregator.

Usage

range_stat_aggregator$new(
  ...,
  ylwr = min,
  y = mean,
  yupr = max,
  interleave_gaps,
  coef_gap,
  NA_position
)

Arguments

yupr, y, ylwr

Functions. Statistical values are calculated using this function. By default, max, mean, min, respectively. Note that the NA values are omitted automatically.

interleave_gaps, coef_gap, NA_position, ...

Arguments pass to the constructor of aggregator object.


Method clone()

The objects of this class are cloneable with this method.

Usage

range_stat_aggregator$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
data(noise_fluct)
agg <- range_stat_aggregator$new(
  ylwr = min, y = mean, yupr = max, interleave_gaps = TRUE
)
d_agg <- agg$aggregate(nanotime::as.nanotime(noise_fluct$time), noise_fluct$f500, 100)
plotly::plot_ly(x = d_agg$x, y = d_agg$y, type = "scatter", mode = "lines") %>%
  plotly::add_trace(x = d_agg$x, y = d_agg$ylwr, type = "scatter", mode = "lines")%>%
  plotly::add_trace(x = d_agg$x, y = d_agg$yupr, type = "scatter", mode = "lines")

Run the code above in your browser using DataLab