waggle | R Documentation |
Waggle back and forth between two numbers
waggle(min, max, value = (min + max)/2, step = (max - min)/50, fps = 10)
min |
A minimum value. |
max |
A maximum value. |
value |
Starting value. Defaults to half-way between |
step |
How much value changes at each frame. Defaults to 50 steps between min and max so it takes 5 seconds to waggle once. |
fps |
number of frames per second. |
span <- waggle(0.2, 1)
mtcars %>% ggvis(~mpg, ~wt) %>%
layer_points() %>%
layer_smooths(span = span)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.