Is there an upper limit of code in R

Hi all

I am working on a Shiny app for some time. I have an file upload and tabs in the UI and calculations in the server. When I add an extra tab, my file upload don't seems to work any more, I checked multiple times, but it don't work. I can select an local file on my pc, but after that, it don't seems to respond anymore. When I remove the last tabPanel, it works fine, but I don't see the problem. Is there a possibility that R code is starting to get to big? I have only 300 lines of code, or is there not such thing? I don't get an error.

library(shiny)
library(lubridate)
library(tidyverse)
library(ggplot2)
library(shinythemes)
library(celestial)
library(data.table)

options(shiny.maxRequestSize=30*1024^2)



ui = navbarPage(theme = shinytheme("superhero"),
                title = "Interactive data analyse tool RDK",
                tabPanel("Data upload & bio", icon = icon("fa-duotone fa-file-import"),
                         sidebarLayout(
                           sidebarPanel(
                             fileInput("import", "Choose TXT/CSV File", accept = c("text/csv",
                                                                                   "text/comma-separated-values,text/plain",
                                                                                   ".csv"))
                           ),
                           mainPanel(
                             h1("Origin and goal of this project.")
                           )
                         )),
                navbarMenu("Sample distribution over 24h",
                           tabPanel("Distribution based on TEST", icon = icon("fa-duotone fa-flask-vial"),
                                    sidebarLayout(
                                      sidebarPanel(
                                        selectInput("test", "Test:", choices = NULL)),
                                      mainPanel(
                                        plotOutput("barplot1")))),
                           tabPanel("Distribution based on SYSTEM", icon = icon("fa-duotone fa-microscope"),
                                    sidebarLayout(
                                      sidebarPanel(
                                        selectInput("system", "System:", choices = NULL)),
                                      mainPanel(
                                        plotOutput("barplot2")))),
                           tabPanel("Distribution based on LOCATION", icon = icon("fa-duotone fa-building-flag"),
                                    sidebarLayout(
                                      sidebarPanel(
                                        selectInput("location", "Location:", choices = NULL)),
                                      mainPanel(
                                        plotOutput("barplot3")))),
                           tabPanel("Distribution based on VALIDATED BY", icon = icon("fa-duotone fa-user-check"),
                                    sidebarLayout(
                                      sidebarPanel(
                                        selectInput("validation", "Validated by:", choices = NULL)),
                                      mainPanel(
                                        plotOutput("barplot4"))))),
                
                 navbarMenu("Statistics TAT",         
                     tabPanel("Overall TAT", icon = icon("fa-duotone fa-calculator"),
                         sidebarLayout(
                           sidebarPanel(
                             h3("Statistical values"),
                             p("The mean TAT is:"),
                             tableOutput("mean_overall"),
                             p("The quantiles expressed in minutes:"),
                             tableOutput("quantiles_overall")),
                           
                           mainPanel(
                             h3("Statistical plot"),
                             plotOutput("barplot5")))),
                     tabPanel("TAT per TEST", icon = icon("fa-duotone fa-flask-vial"),
                              sidebarLayout(
                                sidebarPanel(
                                  h3("Statistical values"),
                                  p("The mean TAT is:"),
                                  tableOutput("mean_overall"),
                                  p("The quantiles expressed in minutes:"),
                                  tableOutput("quantiles_overall")),
                                
                                mainPanel(
                                  h3("Statistical plot"),
                                  plotOutput("barplot5")))))
)


Thanks in advance!

No, there is no such limit, could you prepare a reproducible example (reprex) illustrating your issue? Please have a look at these resources, to see how to create one for a shiny app

Hi all

Thank you for the response. When I wrote it line by line, it worked. but coping the previous tabPanel didn't worked. Strange!

Best regards

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.