layer_guess {ggvis} | R Documentation |
layer_guess
provides the magic behind the default behaviour of
ggvis
.
layer_guess(vis, ...)
vis |
The visualisation to add the new layer to. |
... |
Other arguments passed on individual layers. |
Continuous x, layer_histograms
Categorical x, layer_bars
Continuous x and y, layer_points
# A scatterplot: mtcars %>% ggvis(~mpg, ~wt) mtcars %>% ggvis(~mpg, ~wt) %>% layer_guess() # A histogram: mtcars %>% ggvis(~mpg) mtcars %>% ggvis(~mpg) %>% layer_guess()