Hi all!
I'm trying to load na info.R file inside the ui.R file.
The info.R file contains all string variables that I want to display in my introduction tap.
The info.R contains the following variables:
intro_h1 <- "welcome to my app"
intro_p1 <- "This app is for..."
intro_h2 <- "How to use the app?"
intro_p2 <- "Start by …."
….. and so on …
The ui.R has the following:
load(info.R)
dashboardPage(
skin = "green",
dashboardHeader(title = "My app"),
dashboardSidebar(
sidebarMenu(
menuItem("Introduction", icon = icon("play"), tabName = **"I**ntroduction")
) #close sidebarMenu
), #close dashboardSidebar
dashboardBody(
tabItems(
tabItem(tabName = "Introduction",
column(9,
tags$h2(strong(p(intro_h1))),
tags$h4(p(intro_p1)),
tags$h2(strong(p(intro_h2))),
tags$h4(p(intro_p2)),
tags$h2(strong(p(intro_h3))),
tags$h4(p(intro_p3)),
tags$h2(strong(p(intro_h4))),
tags$h4(p(intro_p4))
) # column
), # tabItem
tabItem(tabName = "download",
tags$h4(p("down")),
downloadButton("donwnloadReport", "Download")
)
) # tabItems
) # dashboardBory
) # dashboardPage
Problem:
The variables "strings" do not get displayed in shiny.
Is this a bad implementation?
Since I have a lot of informative text to display, I wanted to keep all "hardcoded text" in a separated file,
which can be easy to modify.
Thanks for all the info,
Shiny regards!
Elia