From the course: Building Data Apps with R and Shiny: Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Download data from DT tables

Download data from DT tables

From the course: Building Data Apps with R and Shiny: Essential Training

Start my 1-month free trial

Download data from DT tables

- If you want to allow your users to download data from a table in shiny app the most flexible solution is to use the DT package. Lets see in action by going to our exercise files and folder 07_02 and we'll open up our RStudio project. Lets open the uI.R file and the server.R file and we'll learn showing the app. So we have an interactive table provided to us by the DT package. What I want to do is this table is I want to filter, so I only see movies released in 2012. I am going to arrange the data by the IMDB rating. We can see Hannibal is the top rated movie here and I'm going to click on the download data button and I'll expect to see this view of the data in the file I download. I'll click save and now when I go to my downloads folder I can see my nicely formatted CSV file here. But when I open it in Excel we see I don't have the view of the data I made from filtering within the DT table I have the actual data file itself. Let's utilize the buttons build into the DT package. So…

Contents