Select a dataset with an input_select()
.
action_select_data(g, input, datasets)
g | An object of class |
---|---|
input | Id of the |
datasets | A key value pair |
# works in Rmarkdown input_select( "selector", "Select a dataset", c("Cars", "More Cars") ) cars1 <- cars cars2 <- cars + c(1, -4) g2(cars, asp(dist, speed)) %>% fig_point() %>% action_select_data( "selector", datasets = list( "Cars" = cars1, "More Cars" = cars2 ) )