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