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