dataSync | R Documentation |
The purpose of this module is to merge changes made to a subset of the data with the master copy of the data.
dataSyncUI(id) dataSyncServer( id, data = reactive(NULL), data_subset = reactive(NULL), rows = reactive(NULL), columns = reactive(NULL), hide = FALSE, hover_text = NULL )
id |
unique identifier for the module to prevent namespace clashes when making multiple calls to this shiny module. |
data |
master copy of the data. |
data_subset |
subset of |
rows |
the row indices of |
columns |
the column indices of |
hide |
logical indicating whether the data synchronisation user interface should be hidden from the user, set to FALSE by default. |
hover_text |
text to display on download button when user hovers cursor over button, set to NULL by default to turn off hover text. |
Dillon Hammill, Dillon.Hammill@anu.edu.au
if(interactive()){ library(shiny) library(rhandsontable) library(shinyjs) ui <- fluidPage( useShinyjs(), dataInputUI("input1"), dataFilterUI("filter1"), dataSyncUI("sync1"), dataEditUI("edit1") ) server <- function(input, output, session) { values <- reactiveValues( data = NULL, data_subset = NULL ) data_input <- dataInputServer("input1") data_edit <- dataEditServer( "edit1", data = data_input ) data_sync <- dataSyncServer( "sync1", data = data_input, data_subset = data_edit, rows = NULL, columns = NULL ) } shinyApp(ui, server) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.