Created
March 29, 2017 08:13
-
-
Save sinacek/1e298396de11ea5277d94c99460be0c9 to your computer and use it in GitHub Desktop.
Revisions
-
sinacek created this gist
Mar 29, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ ui <- bootstrapPage( actionButton("createDir", "Create dir"), textOutput("info") ) server <- function(input, output) { observeEvent(input$createDir, { dirPath <- paste0(round(as.numeric(Sys.time()))) dir.create(dirPath) output$info <- renderPrint({ if(dir.exists(dirPath)) { return("Dir was succesfully created") } else { return("Creation of dir failed") } }) }) } # Return a Shiny app object shinyApp(ui = ui, server = server)