File: verbatimTextOutput.Rd

package info (click to toggle)
r-cran-shiny 1.0.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,080 kB
  • ctags: 290
  • sloc: makefile: 22; sh: 13
file content (44 lines) | stat: -rw-r--r-- 1,342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap.R
\name{verbatimTextOutput}
\alias{verbatimTextOutput}
\title{Create a verbatim text output element}
\usage{
verbatimTextOutput(outputId, placeholder = FALSE)
}
\arguments{
\item{outputId}{output variable to read the value from}

\item{placeholder}{if the output is empty or \code{NULL}, should an empty
rectangle be displayed to serve as a placeholder? (does not affect
behavior when the the output in nonempty)}
}
\value{
A verbatim text output element that can be included in a panel
}
\description{
Render a reactive output variable as verbatim text within an
application page. The text will be included within an HTML \code{pre} tag.
}
\details{
Text is HTML-escaped prior to rendering. This element is often used
  with the \link{renderPrint} function to preserve fixed-width formatting
  of printed objects.
}
\examples{
## Only run this example in interactive R sessions
if (interactive()) {
  shinyApp(
    ui = basicPage(
      textInput("txt", "Enter the text to display below:"),
      verbatimTextOutput("default"),
      verbatimTextOutput("placeholder", placeholder = TRUE)
    ),
    server = function(input, output) {
      output$default <- renderText({ input$txt })
      output$placeholder <- renderText({ input$txt })
    }
  )
}
}