shinyUI(pageWithSidebar( headerPanel('Downloading Data'), sidebarPanel( selectInput("dataset", "Choose a dataset:", choices = c("rock", "pressure", "cars")), downloadButton('downloadData', 'Download') ), mainPanel( tableOutput('table') ) ))