Skip to content

Instantly share code, notes, and snippets.

@sinacek
Created March 29, 2017 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinacek/1e298396de11ea5277d94c99460be0c9 to your computer and use it in GitHub Desktop.
Save sinacek/1e298396de11ea5277d94c99460be0c9 to your computer and use it in GitHub Desktop.
Shiny in docker - file permission problem in Rocker/shiny
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