Skip to content

Instantly share code, notes, and snippets.

@sinacek
Created March 29, 2017 08:13
Show Gist options
  • Select an option

  • Save sinacek/1e298396de11ea5277d94c99460be0c9 to your computer and use it in GitHub Desktop.

Select an option

Save sinacek/1e298396de11ea5277d94c99460be0c9 to your computer and use it in GitHub Desktop.

Revisions

  1. sinacek created this gist Mar 29, 2017.
    21 changes: 21 additions & 0 deletions app.R
    Original 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)