library(shiny)
library(shinyProc)
library(ggplot2)
ui <- shinyUI(fluidPage(
titlePanel("Read RDS"),
sidebarLayout(
sidebarPanel(
exportRDSUI("data", doneButtonTitle = "Download data!"),
exportRDSUI("plot", doneButtonTitle = "Download plot!")
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
))
getDt = function() return(iris)
getPlot = function()
{
qplot(mpg, wt, data = mtcars)
}
server <- shinyServer(function(input, output) {
callModule(makeExportRDS, id = "data", getDt)
callModule(makeExportRDS, id = "plot", getPlot)
})
# Run the application
shinyApp(ui = ui, server = server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.