candlestick_aggregator | R Documentation |
This aggregator divides the data into no-overlapping intervals and calculate the first, maximum, minimum, and last values of the data, which represents candle sticks.
An R6::R6Class
object
shinyHugePlot::aggregator
-> candlestick_aggregator
new()
Constructor of the aggregator.
candlestick_aggregator$new(..., interleave_gaps, coef_gap, NA_position)
interleave_gaps, coef_gap, NA_position, ...
Arguments pass to the constructor of aggregator
object.
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.
clone()
The objects of this class are cloneable with this method.
candlestick_aggregator$clone(deep = FALSE)
deep
Whether to make a deep clone.
data(noise_fluct)
agg <- candlestick_aggregator$new(interleave_gaps = TRUE)
d_agg <- agg$aggregate(nanotime::as.nanotime(noise_fluct$time), noise_fluct$f500, 100)
fig <- plotly::plot_ly(
x = d_agg$x, open = d_agg$open, high = d_agg$high, low = d_agg$low, close = d_agg$close,
type = "candlestick"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.