Shiny Tags Throwing Errors

I am trying to create an about page for my Shiny App with a basic app description. Part of this involves some bullet points. I ended up using the following code in the tab UI:

column(width=10,
tags$div(
tags$ul(
tags$li("Manhattan plot of CpGs located within genes"),
tags$li("Annotations (UCSC Genes, ENSEMBL genes, and ",
"transcripts, chromatin states, CpG islands)"),
tags$li("Download summary statistics (odds ratio, effect ",
"estimate, pValues) of CpGs and DMRs in recent AD ",
"and aging studies. ")
)
)
)

Yesterday night, the code ran without error. About an hour ago, it ran without error. Then, I had to briefly close Rstudio, and when I reopened it to run the code, I now get the following error:
Error in tags$div : object of type 'closure' is not subsettable
Calls: runApp ... tabItem -> div -> dots_list -> column -> div -> dots_list
Execution halted

I'm not sure what the problem is. Is there a reason why using tags might cause errors, or that the behavior might be inconsistent? Also, is there a way to create bullet points without using tags?

The above code works fine - the problem is elsewhere:

library(shiny)

ui <- fluidPage(
  column(width=10,
         tags$div(
           tags$ul(
             tags$li("Manhattan plot of CpGs located within genes"),
             tags$li("Annotations (UCSC Genes, ENSEMBL genes, and ",
                     "transcripts, chromatin states, CpG islands)"),
             tags$li("Download summary statistics (odds ratio, effect ",
                     "estimate, pValues) of CpGs and DMRs in recent AD ",
                     "and aging studies. ")
           )
         )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

it was probably some sort of namespace collision, possibly due to the order of loading libraries.
with shiny (via htmltools) tags, is a list of named tags, so tags$div gives

function (..., .noWS = NULL, .renderHook = NULL) 
{
    validateNoWS(.noWS)
    contents <- dots_list(...)
    tag("div", contents, .noWS = .noWS, .renderHook = .renderHook)
}
<bytecode: 0x000002c1c40b5db8>
<environment: namespace:htmltools>

if you got an error instead, that implies you aren't looking at that tags but something else instead.
doing

tags

or

str(tags)

might reveal what (if the issue is recurring)

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.