SalahEddine charki SalahEddine charki - 3 years ago 56
R Question

Shiny Retrieve the data displayed from output$x

How I can retrieve the data displayed from output.

output$x <-renderDataTable(data ())

For reuse in other places

Answer Source

Next time please specify Your problem better...

Well You do have reactive data in the code and You actually called it/retrieved it by using: data() *****

*****(and if you wanna use it in another output simply type again data())

I assume that You use DT package (renderDataTable) in which You wanna filter primary data and retrieve it back? (i might be wrong due to the lack of detailed description of the problem)

To use the filtered data just simply use (as in Your case):

data_filtered <- reactive({
        filtered_data <- input$x_rows_all
        data <- data()[filtered_data, , drop = FALSE]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download