Convert a quosure to a function for a Shiny render function — quoToFunction

quoToFunction(q, label, ..stacktraceon = FALSE)

Arguments

q

A quosure.

label

A label for the object to be shown in the debugger. Defaults to the name of the calling function.

..stacktraceon

Advanced use only. For stack manipulation purposes; see stacktrace().

Description

This takes a quosure and label, and wraps them into a function that should be passed to createRenderFunction() or markRenderFunction().

Details

This function was added in Shiny 1.6.0. Previously, it was recommended to use installExprFunction() or exprToFunction() in render functions, but now we recommend using quoToFunction(), because it does not require env and quoted arguments -- that information is captured by quosures provided by rlang.

See also

createRenderFunction() for example usage.