Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions inst/examples/10_download/app.R
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
library(bslib)
library(shiny)

# Define UI for data download app ----
ui <- fluidPage(
ui <- page_sidebar(

# App title ----
titlePanel("Downloading Data"),
tableOutput("table"),

# Sidebar layout with input and output definitions ----
sidebarLayout(

# Sidebar panel for inputs ----
sidebarPanel(

# Input: Choose dataset ----
selectInput("dataset", "Choose a dataset:",
choices = c("rock", "pressure", "cars")),

# Button
downloadButton("downloadData", "Download")

),

# Main panel for displaying outputs ----
mainPanel(

tableOutput("table")

)

)
sidebar = sidebar(
# Input: Choose dataset ----
selectInput("dataset", "Choose a dataset:",
choices = c("rock", "pressure", "cars")),

# Button
downloadButton("downloadData", "Download")
),
title = "Downloading Data"
)

# Define server logic to display and download selected file ----
Expand Down