manupulating the reactive variable output in Rshiny

Hi,
In my Use case i want to display only the value(3.45783) and not the index i.e [1] in my output. below are the screenshot of the code and the output
image

Here
result is a reactive variable


the code for displaying the result
as you can see result is a reactive variable

I think the easiest solution is to use renderText instead of renderPrint.

library(shiny)

ui <- fluidPage(
  verbatimTextOutput("o1"),
  verbatimTextOutput("o2")
)

server <- function(input, output, session) {
  output$o1 <- renderPrint(
    .6
  )
  output$o2 <- renderText(
    .6
  )
}

shinyApp(ui, server)

Thank you this worked!

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.