rms_max_aggregator | R Documentation |
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.
An R6::R6Class
object
shinyHugePlot::aggregator
-> shinyHugePlot::rng_aggregator
-> rms_max_aggregator
new()
Constructor of the aggregator.
rms_max_aggregator$new( ..., interleave_gaps, coef_gap, NA_position, use_abs = TRUE )
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.
clone()
The objects of this class are cloneable with this method.
rms_max_aggregator$clone(deep = FALSE)
deep
Whether to make a deep clone.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.