R: Mark a function as a render function

markRenderFunction {shiny} | R Documentation

## Mark a function as a render function

### Description

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.

### Usage

    markRenderFunction(uiFunc, renderFunc, outputArgs = list())

### 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 `uiFunc`. Render functions should include `outputArgs = list()` in their own parameter list, and pass through the value to `markRenderFunction`, to allow app authors to customize outputs. (Currently, this is only supported for dynamically generated UIs, such as those created by Shiny code snippets embedded in R Markdown documents).

### Value

The `renderFunc` function, with annotations.

[Package shiny version 1.0.5 Index]