Creates a render function for inline outputs that automatically formats numeric values appropriately (integers without decimals, other numbers to one decimal place).
Usage
renderInline(expr, env = parent.frame(), quoted = FALSE)
Examples
library(shiny)
ui <- fluidPage(
p("The result is", inlineOutput("result"))
)
server <- function(input, output) {
output$result <- renderInline({
# Will be formatted to one decimal place
42.123
})
}
if (interactive()) {
shinyApp(ui, server)
}