0

I have a problem while sourcing a R script inside a tabsetPanel layer :

ui <- fluidPage(
 titlePanel("Open Medic"),

 tabsetPanel(type = "tabs",
              tabPanel("Tab1", source("src/ui/1-tab1_ui.R"))                   
               ))

server <- function(input, output, session) {
  source("src/server/1-myserver.R", local = T)
}

This code always displays a "TRUE" message. I don't have any problem if I dont use a "source" instruction.

The result can be seen there :

Problem with shiny tabs

EDIT : The 1-tab1_ui.R content is shown below :

 mainPanel(  helpText("Here is the problematic message :") )

While the server.R is actually an empty "toy" file

yoyo
  • 121
  • 3
  • We can't really help you without knowing what's in `src/ui-server/...` since the problem may coming from there. On a sidenote, you should consider using [modules](https://shiny.rstudio.com/articles/modules.html) instead of sourcing files. – denrou Feb 05 '18 at 15:32
  • Hi. I have edited my question with the content of my files. – yoyo Feb 05 '18 at 15:44
  • You may check [here](https://stackoverflow.com/questions/30534674/displaying-true-when-shiny-files-are-split-into-different-folders) – akrun Feb 05 '18 at 15:58
  • Thanks this works perfectly ! And thanks for the advice regarding modules – yoyo Feb 05 '18 at 16:08

0 Answers0