waggle: Waggle back and forth between two numbers

View source: R/waggle.R

waggleR 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 min and max.

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)

ggvis documentation built on May 29, 2024, 1:12 a.m.