EVOLUTION-MANAGER
Edit File: htmlwidgets-shiny.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Shiny bindings for HTML widgets</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for htmlwidgets-shiny {htmlwidgets}"><tr><td>htmlwidgets-shiny {htmlwidgets}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Shiny bindings for HTML widgets</h2> <h3>Description</h3> <p>Helpers to create output and render functions for using HTML widgets within Shiny applications and interactive Rmd documents. </p> <h3>Usage</h3> <pre> shinyWidgetOutput(outputId, name, width, height, package = name, inline = FALSE, reportSize = FALSE) shinyRenderWidget(expr, outputFunction, env, quoted) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>outputId</code></td> <td> <p>output variable to read from</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>Name of widget to create output binding for</p> </td></tr> <tr valign="top"><td><code>width, height</code></td> <td> <p>Must be a valid CSS unit (like <code>"100%"</code>, <code>"400px"</code>, <code>"auto"</code>) or a number, which will be coerced to a string and have <code>"px"</code> appended.</p> </td></tr> <tr valign="top"><td><code>package</code></td> <td> <p>Package containing widget (defaults to <code>name</code>)</p> </td></tr> <tr valign="top"><td><code>inline</code></td> <td> <p>use an inline (<code>span()</code>) or block container (<code>div()</code>) for the output</p> </td></tr> <tr valign="top"><td><code>reportSize</code></td> <td> <p>Should the widget's container size be reported in the shiny session's client data?</p> </td></tr> <tr valign="top"><td><code>expr</code></td> <td> <p>An expression that generates an HTML widget (or a <a href="https://rstudio.github.io/promises/">promise</a> of an HTML widget).</p> </td></tr> <tr valign="top"><td><code>outputFunction</code></td> <td> <p>Shiny output function corresponding to this render function.</p> </td></tr> <tr valign="top"><td><code>env</code></td> <td> <p>The environment in which to evaluate <code>expr</code>.</p> </td></tr> <tr valign="top"><td><code>quoted</code></td> <td> <p>Is <code>expr</code> a quoted expression (with <code>quote()</code>)? This is useful if you want to save an expression in a variable.</p> </td></tr> </table> <h3>Details</h3> <p>These functions are delegated to from within your widgets own shiny output and render functions. The delegation is boilerplate and always works the same for all widgets (see example below). </p> <h3>Value</h3> <p>An output or render function that enables the use of the widget within Shiny applications. </p> <h3>Examples</h3> <pre> # shiny output binding for a widget named 'foo' fooOutput <- function(outputId, width = "100%", height = "400px") { htmlwidgets::shinyWidgetOutput(outputId, "foo", width, height) } # shiny render function for a widget named 'foo' renderFoo <- function(expr, env = parent.frame(), quoted = FALSE) { if (!quoted) { expr <- substitute(expr) } # force quoted htmlwidgets::shinyRenderWidget(expr, fooOutput, env, quoted = TRUE) } </pre> <hr /><div style="text-align: center;">[Package <em>htmlwidgets</em> version 1.5.1 <a href="00Index.html">Index</a>]</div> </body></html>