Description Usage Arguments Examples
Add and clear data in Shiny.
1 2 3 |
proxy |
A proxy as returned by |
data |
A |
from |
Source and target of edges. |
to |
Source and target of edges. |
value |
Numerical value of edges. |
... |
Any other columns to select from the data, i.e.: |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | if(interactive()){
library(shiny)
data("country_data")
ui <- fluidPage(
actionButton("add", "add"),
actionButton("clear", "clear"),
giorOutput("gior")
)
server <- function(input, output, session){
output$gior <- renderGior({
data %>%
gior() %>%
g_data(from, to, value)
})
observeEvent(input$clear, {
giorProxy("gior") %>%
g_clear_p()
})
observeEvent(input$add, {
giorProxy("gior") %>%
g_data_p(country_data, from, to, value)
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.