Created
July 29, 2016 04:15
-
-
Save daranzolin/ff24651c23c42e616c18cf9840a1c91f to your computer and use it in GitHub Desktop.
This file contains 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) | |
makeStringsGadget <- function(...) { | |
ui <- miniPage( | |
gadgetTitleBar("Type your strings freely!"), | |
miniContentPanel( | |
textInput("sep", "Separator:"), | |
textInput("text", "Strings:") | |
) | |
) | |
server <- function(input, output, session) { | |
observeEvent(input$done, { | |
returnValue <- unlist(strsplit(as.character(input$text), split = input$sep)) | |
stopApp(returnValue) | |
}) | |
} | |
runGadget(ui, server) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment