Created
October 6, 2017 20:18
-
-
Save seankross/47e17ef1ab40a1060c1d80a86a3a9616 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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