| textOutput {tabler} | R Documentation |
Text Output Placeholder
Description
Places a <span> in the UI whose content is updated by
renderText in the server.
Places a <pre> in the UI for monospace/printed output.
Places a tag (by default a <div>) whose inner HTML is
replaced wholesale by renderUI output.
Returns a character string that is HTML-escaped and injected as
the inner HTML of the matching textOutput placeholder.
Captures the print() representation of the result and
shows it verbatim (HTML-escaped).
Returns an HTML tag tree that replaces the inner HTML of the
matching uiOutput placeholder.
Places a <div> in the UI whose content is replaced by a
base-R plot rendered server-side via renderPlot.
Evaluates expr inside an SVG graphics device, and
injects the resulting inline SVG into the matching plotOutput
placeholder. Works with base-R graphics, tinyplot, ggplot2,
lattice, and any other graphics system that honours the active
device.
Places a <div> in the UI whose content is replaced by an
htmlwidget (e.g. from d3po, leaflet, plotly) rendered by
a matching server-side call. The widget is served inside a sandboxed
<iframe> so its own JS/CSS cannot conflict with the page.
Generic render function for any htmlwidgets-based widget.
Captures the expression without evaluating it and stores the calling
environment, so tablerApp can evaluate it inside a reactive context
without requiring a live Shiny session. Reactive values referenced inside
expr are tracked automatically.
Assigned to output$id, serves a file for download when
the browser requests the matching downloadButton's link,
similar to shiny::downloadHandler(). Unlike other outputs, the
file is generated fresh (not cached/pushed) each time it is requested.
Creates a link that triggers a file download from the
matching downloadHandler, similar to
shiny::downloadButton()/shiny::downloadLink().
Usage
textOutput(outputId, inline = FALSE)
verbatimTextOutput(outputId)
uiOutput(outputId, container = div, ...)
htmlOutput(outputId, container = div, ...)
renderText(expr)
renderPrint(expr)
renderUI(expr)
plotOutput(outputId, width = "100%", height = "400px")
renderPlot(expr, width = 800, height = 400)
widgetOutput(outputId, width = "100%", height = "400px")
renderWidget(expr)
downloadHandler(filename, content, contentType = NULL)
downloadButton(
outputId,
label = "Download",
class = "btn-primary",
icon = "download",
...
)
downloadLink(outputId, label = "Download", class = NULL, icon = NULL, ...)
Arguments
outputId |
The output identifier (must match the server-side
downloadHandler assigned to output[[outputId]]).
|
inline |
If TRUE, use <span>; otherwise <div>.
|
container |
A tag-building function used to create the placeholder
element, e.g. tags$h1. Defaults to div.
|
... |
Additional HTML attributes. |
expr |
Expression that returns an htmlwidget object (e.g.
d3po(...), leaflet(...)).
|
width |
CSS width string (default "100%").
|
height |
CSS height string (default "400px").
|
filename |
A string, or a zero-argument function returning a string,
giving the filename offered to the browser (e.g. "data.csv").
|
content |
A one-argument function function(file) {...} that
writes the file's contents to the path given by file.
|
contentType |
Optional MIME type string. If NULL (default), it
is guessed from the filename's extension.
|
label |
Link/button text. |
class |
Additional CSS classes (default "btn-primary" for
downloadButton, none for downloadLink).
|
icon |
Optional icon name to prepend. |
Details
Package authors who ship their own render_*() helpers can make them
tabler-compatible by attaching the same two attributes:
attr(fn, "tabler_expr") <- substitute(expr) attr(fn, "tabler_env") <- parent.frame()
This is exactly what render_d3po() in d3po already does.
Value
An HTML tag.
An HTML tag.
An HTML tag.
A tabler_render object for use with tablerApp.
A tabler_render object.
A tabler_render object.
An HTML tag.
A tabler_render object.
An HTML tag.
A zero-argument function with tabler_expr and
tabler_env attributes recognised by tablerApp.
A tabler_render object for use with tablerApp.
An HTML tag.