interact_plot {cleanTS}R Documentation

Create interactive plot


Interactive plot is similar to the animated plot, but gives the used some control over the animation. It runs a shinyApp instead of creating a GIF.


interact_plot(obj, interval)



A cleanTS object.


A numeric or character, specifying the viewing interval.


The problem with an animated plot is that the user does not have any control over the animation. There is not play or pause functionality so that the user can observe any desired frame. This can be achieved by adding interactivity to the plot. The interact_plot() function creates and runs a shiny widget locally on the machine. It takes the cleanTS object and splits the cleaned data according to the interval argument, similar to the ⁠animate interval()⁠ function. It then creates a shiny widget which shows the plot for the current state and gives a slider used to change the state. Unlike animate_interval() it provides a global report containing information about complete data, and a state report giving information about the current state shown in the plot.


Does not return any value.


## Not run: 
# Using the same data used in `cleanTS()` function example.
interact_plot(cts, interval = "1 week")

## End(Not run)

[Package cleanTS version 0.1.1 Index]