shinyFiles icon indicating copy to clipboard operation
shinyFiles copied to clipboard

Navigation through folders is limited. At a certain point I cannot open additional folders.

Open jsoeldi opened this issue 5 years ago • 3 comments

I am currently building a shiny app where the user can choose the directoy from which the data is loaded. It all works fine if I only need to open a small number of folders. After 6 Folders I cannot open addiotional Folders.

jsoeldi avatar Sep 16 '20 13:09 jsoeldi

That sounds very odd. Can you provide a minimal reproducible example?

vnijs avatar Sep 17 '20 07:09 vnijs

This is my UI script:

Shiny App

library(shiny) library(shinyFiles) library(plotly)

Define UI for app that draws Efficient Frontier ---- ui <-fluidPage(

App title ---- titlePanel("Efficient Frontier"),

sidebarLayout(
  sidebarPanel(


    shinyDirButton('directory', label='Select Directory!', title='Please select a Directory'),
    verbatimTextOutput(outputId = "directory", placeholder=TRUE),


    actionButton("goButton", "Go!"),

  
  
      sliderInput(inputId = "Candidate",
             label = "Number of Candidates:",
             min = 0,
             max = 70,
             value = 10),

             #choices = seq(0,50),
              #multiple = FALSE,
               # default value
  



        selectInput(inputId = "stats_x", 
            label= "Summary X-axis",
            choices = c("Mean",
                         "Standard Deviation",
                         "5% Percentile",
                         "25% Percentile",
                         "50% Percentile",
                         "75% Percentile",
                         "95% Percentile")
            ),

      selectInput(inputId = "period.x",
            label = "Period on X-axis",
            choices = seq(0,11)),


      selectInput(inputId = "stats_y",
            label= "Summary y-axis",
            choices = c("Mean",
              "Standard Deviation",
              "5% Percentile",
              "25% Percentile",
              "50% Percentile",
              "75% Percentile",
              "95% Percentile")
),

          selectInput(inputId = "period.y",
            label = "Period on y-axis",
            choices = seq(0,11)),
),
  mainPanel(

plotlyOutput(outputId = "fig")

  )

  
  

))

This is the Server part:

server <- function(input, output, data=grouped_data) {

source("G:\4AB_ALLE\Soelderer\R_Trials\load_data_function.R") #source data loading function

roots <-getVolumes()()

shinyDirChoose( input, 'directory', roots = roots, filetypes = c('', 'txt', 'bigWig', "tsv", "csv", "bw") # defining roots of working direcory and potential files

)

dir <- reactive(input$directory) output$directory <- renderText({
parseDirPath(roots, dir()) })

observeEvent(input$goButton,{

  1. once the button is pushed

  2. load_data from the directory choosen

    z <- parseDirPath(roots, dir()) # the file path load_data(paste(z))
    }

As already mentioned. Everythin works fine, but I cannot open certain folders. It has acutally nothing to do with the number of steps. I changed the roots argument within shinyDirChoose so that the Folder I wanted to select was in the roots folder. However, it won't let me open the specific folders. Could it be that they are too large? Thank you very much for the package and for your help! I am sorry for the mess in the Code here, I am new on Github and have not yet figured out how it works! :P

jsoeldi avatar Sep 17 '20 11:09 jsoeldi

My first thought is that it could be a permission issue on the folders but I'm not sure. The other is that if you do have 1000s of files in a folder things could get slow https://github.com/thomasp85/shinyFiles/issues/140

vnijs avatar Sep 17 '20 19:09 vnijs