Description Usage Arguments Details Value Examples
Render a reactive output variable as text within an application page.
textOutput()
is usually paired with renderText()
and puts regular text
in <div>
or <span>
; verbatimTextOutput()
is usually paired with
renderPrint()
and provudes fixed-width text in a <pre>
.
1 2 3 | textOutput(outputId, container = if (inline) span else div, inline = FALSE)
verbatimTextOutput(outputId, placeholder = FALSE)
|
outputId |
output variable to read the value from |
container |
a function to generate an HTML element to contain the text |
inline |
use an inline ( |
placeholder |
if the output is empty or |
In both funtions, text is HTML-escaped prior to rendering.
A output element for use in UI.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Only run this example in interactive R sessions
if (interactive()) {
shinyApp(
ui = basicPage(
textInput("txt", "Enter the text to display below:"),
textOutput("text"),
verbatimTextOutput("verb")
),
server = function(input, output) {
output$text <- renderText({ input$txt })
output$verb <- renderText({ input$txt })
}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.