waggle {ggvis} | R Documentation |
Waggle back and forth between two numbers
Description
Waggle back and forth between two numbers
Usage
waggle(min, max, value = (min + max)/2, step = (max - min)/50, fps = 10)
Arguments
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. |
Examples
span <- waggle(0.2, 1)
mtcars %>% ggvis(~mpg, ~wt) %>%
layer_points() %>%
layer_smooths(span = span)
[Package ggvis version 0.4.9 Index]