layer_guess {ggvis}R Documentation

Guess the right type of layer based on current properties.

Description

layer_guess provides the magic behind the default behaviour of ggvis.

Usage

layer_guess(vis, ...)

Arguments

vis

The visualisation to add the new layer to.

...

Other arguments passed on individual layers.

Defaults

Examples

# A scatterplot:
mtcars %>% ggvis(~mpg, ~wt)
mtcars %>% ggvis(~mpg, ~wt) %>% layer_guess()

# A histogram:
mtcars %>% ggvis(~mpg)
mtcars %>% ggvis(~mpg) %>% layer_guess()

[Package ggvis version 0.4.9 Index]