createRenderFunction: Implement render functions

Description Usage Arguments Value

Description

Implement render functions

Usage

1
2
createRenderFunction(func, transform = function(value, session, name,
  ...) value, outputFunc = NULL, outputArgs = NULL)

Arguments

func

A function without parameters, that returns user data. If the returned value is a promise, then the render function will proceed in async mode.

transform

A function that takes four arguments: value, session, name, and ... (for future-proofing). This function will be invoked each time a value is returned from func, and is responsible for changing the value into a JSON-ready value to be JSON-encoded and sent to the browser.

outputFunc

The UI function that is used (or most commonly used) with this render function. This can be used in R Markdown documents to create complete output widgets out of just the render function.

outputArgs

A list of arguments to pass to the outputFunc. Render functions should include outputArgs = list() in their own parameter list, and pass through the value as this argument, 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

An annotated render function, ready to be assigned to an output slot.


nGanon/R_shiny documentation built on May 20, 2019, 9:42 a.m.