custom_stat_aggregator {shinyHugePlot} | R Documentation |
Aggregation which returns arbitrary statistics
Description
This aggregator divides the data into no-overlapping intervals and calculate specific statistical values such as the mean.
Format
An R6::R6Class
object
Super class
shinyHugePlot::aggregator
-> custom_stat_aggregator
Methods
Public methods
Method new()
Constructor of the Aggregator.
Constructor of the Aggregator.
Usage
custom_stat_aggregator$new( ..., y_func = mean, x_mean = TRUE, interleave_gaps, coef_gap, NA_position, accepted_datatype )
Arguments
y_func
Function. Statistical values are calculated using this function. By default,
mean
.x_mean
Boolean. Whether using the mean values or not for the x values. If not, the x values that give the specific y values are used. E.g., if you use
max
as theaggregation_func
and set this argument toFALSE
, x values that give the maximum y values are used. By default,TRUE
.interleave_gaps, coef_gap, NA_position, accepted_datatype, ...
Arguments pass to the constructor of
aggregator
object.
Method clone()
The objects of this class are cloneable with this method.
Usage
custom_stat_aggregator$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
data(noise_fluct)
agg <- custom_stat_aggregator$new(y_func = mean, interleave_gaps = TRUE)
d_agg <- agg$aggregate(noise_fluct$time, noise_fluct$f500, 1000)
plotly::plot_ly(x = d_agg$x, y = d_agg$y, type = "scatter", mode = "lines")