Check if the table exists or not in shiny application

I have something in mind. I am planning to check if the table exists in the webpage. For example, in the below application, there is table displayed on the webpage. So I need to print somewhere on the webpage that the table exists. Something like, if it exists, then 1 or else 0.

Can we populate this?

library(shiny)
library(DT)

ui <- fluidPage(
 DTOutput("tab")
)

server <- function(input, output, session) {
 output$tab <- renderDT({
   datatable(iris)
 }) 
}

shinyApp(ui, server)

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.