markRenderFunction {shiny} | R Documentation |
Mark a function as a render function
Description
Please use createRenderFunction()
to
support async execution. (Shiny 1.1.0)
Usage
markRenderFunction(
uiFunc,
renderFunc,
outputArgs = list(),
cacheHint = "auto",
cacheWriteHook = NULL,
cacheReadHook = NULL
)
Arguments
uiFunc |
A function that renders Shiny UI. Must take a single argument: an output ID. |
renderFunc |
A function that is suitable for assigning to a Shiny output slot. |
outputArgs |
A list of arguments to pass to the |
cacheHint |
One of |
cacheWriteHook |
Used if the render function is passed to |
cacheReadHook |
Used if the render function is passed to |
Details
Should be called by implementers of renderXXX
functions in order to mark
their return values as Shiny render functions, and to provide a hint to Shiny
regarding what UI function is most commonly used with this type of render
function. This can be used in R Markdown documents to create complete output
widgets out of just the render function.
Note that it is generally preferable to use createRenderFunction()
instead
of markRenderFunction()
. It essentially wraps up the user-provided
expression in the transform
function passed to it, then passes the resulting
function to markRenderFunction()
. It also provides a simpler calling
interface. There may be cases where markRenderFunction()
must be used instead of
createRenderFunction()
– for example, when the transform
parameter of
createRenderFunction()
is not flexible enough for your needs.
Value
The renderFunc
function, with annotations.