add_data: Add dataset to a visualisation

View source: R/ggvis.R

add_dataR Documentation

Add dataset to a visualisation

Description

Add dataset to a visualisation

Usage

add_data(vis, data, name = deparse2(substitute(data)), add_suffix = TRUE)

Arguments

vis

Visualisation to modify.

data

Data set to add.

name

Data of data - optional, but helps produce informative error messages.

add_suffix

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.

Examples

mtcars %>% ggvis(~mpg, ~wt) %>% layer_points()
NULL %>% ggvis(~mpg, ~wt) %>% add_data(mtcars) %>% layer_points()

ggvis documentation built on May 29, 2024, 1:12 a.m.