library(shiny) | |
library(miniUI) | |
ui <- miniPage( | |
gadgetTitleBar("My Gadget"), | |
miniContentPanel( | |
## Your UI items go here. | |
) | |
) | |
server <- function(input, output, session) { | |
## Your reactive logic goes here. | |
# Listen for the 'done' event. This event will be fired when a user | |
# is finished interacting with your application, and clicks the 'done' | |
# button. | |
observeEvent(input$done, { | |
# Here is where your Shiny application might now go an affect the | |
# contents of a document open in RStudio, using the `rstudioapi` package. | |
# | |
# At the end, your application should call 'stopApp()' here, to ensure that | |
# the gadget is closed after 'done' is clicked. | |
stopApp() | |
}) | |
} | |
runGadget(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment