powered by
Add dataset to a visualisation
add_data(vis, data, name = deparse2(substitute(data)), add_suffix = TRUE)
Visualisation to modify.
Data set to add.
Data of data - optional, but helps produce informative error messages.
Should a unique suffix be added to the data object's ID? This should only be FALSE when the spec requires a data set with a specific name.
mtcars %>% ggvis(~mpg, ~wt) %>% layer_points() NULL %>% ggvis(~mpg, ~wt) %>% add_data(mtcars) %>% layer_points()
Run the code above in your browser using DataLab