I want to select a directory using R package shinyFiles
. It works in my MAC system, but it does not work in my windows system.
For instance, i want to find a folder in Disk D, but I could not see it.
Here is my demo:
library(shiny)
library(shinyFiles)
ui <- shinyUI(bootstrapPage(
shinyDirButton(id = 'folder', label = 'Folder select', title = 'Select a folder'),
verbatimTextOutput('filepaths')
))
server <- function(input, output){
shinyFiles::shinyDirChoose(input, id = "folder", roots = c(wd = "/", home = "~"))
output$filepaths <- renderPrint(input$folder)
}
shinyApp(ui=ui, server=server)