getting data of selected rows in DT table in shiny app

I have a dataset which I show the DT table for all data, I would like to get the data of selected rows, then plot figures for selected rows. right now I implemented code for one row, how can I consider a couple of rows?
I mean how can I get data of selected rows at the same time (more than one )
I wrote this line of code which gets only one row.
</>
selected_data = data.frame(c[input$fancyTable_rows_selected,])
</>

thanks in advance.

Hi,
Are you able to select two or more rows (in the opposite case, you have changed the default selection = "multiple" )?
In any case, you should be able to get the data of the selected rows this way

selected_data <- source_table()[input$fancyTable_rows_selected,  ]

Where source_table() is the reactive table you have used to create your fancyTable.

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.