rms_max_aggregator {shinyHugePlot} | R Documentation |
Aggregation which returns the rms and maximum values within small data ranges
Description
This aggregator divides the data into no-overlapping intervals and calculate the root-mean-square and the maximum absolute values of the data, which may be helpful to understand the waveforms.
Format
An R6::R6Class
object
Super classes
shinyHugePlot::aggregator
-> shinyHugePlot::rng_aggregator
-> rms_max_aggregator
Methods
Public methods
Inherited methods
Method new()
Constructor of the aggregator.
Usage
rms_max_aggregator$new( ..., interleave_gaps, coef_gap, NA_position, use_abs = TRUE )
Arguments
interleave_gaps, coef_gap, NA_position, ...
Arguments pass to the constructor of
aggregator
object.use_abs
Boolean. If 'TRUE', the maximum absolute values are calculated.
Method clone()
The objects of this class are cloneable with this method.
Usage
rms_max_aggregator$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
data(noise_fluct)
agg <- rms_max_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")
[Package shinyHugePlot version 0.3.0 Index]