powered by
layer_guess provides the magic behind the default behaviour of ggvis.
layer_guess
ggvis
layer_guess(vis, ...)
The visualisation to add the new layer to.
Other arguments passed on individual layers.
Continuous x, layer_histograms
layer_histograms
Categorical x, layer_bars
layer_bars
Continuous x and y, layer_points
layer_points
# 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 DataLab