Created
March 29, 2017 08:13
-
-
Save sinacek/1e298396de11ea5277d94c99460be0c9 to your computer and use it in GitHub Desktop.
Shiny in docker - file permission problem in Rocker/shiny
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
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment