ggvis (version 0.4.4)

layer_guess: 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

Run this code
# NOT RUN {
# A scatterplot:
mtcars %>% ggvis(~mpg, ~wt)
mtcars %>% ggvis(~mpg, ~wt) %>% layer_guess()

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

Run the code above in your browser using DataCamp Workspace