replace_output_w_tmp: Replace top level output$name variable assignments with...

Description Usage Arguments Details Value Examples

Description

Replace top level output$name variable assignments with output__name__

Usage

1

Arguments

code

code to modify

Details

During syntax tree shaking, list datastructures will retain any code affecting any single list element. In processing Shiny outputs, this results in retention of all output code even if only a subset of outputs is desired. To work around this behavior, list elements can be replaced with unique identifiers to decouple individual list elements.

Value

code with assignments replaced

Examples

1
2
3
4
5
6
q <- quote(output$name <- 3)

scriptgloss:::replace_output_w_tmp(q)
# {
#   output__name__ <- 3
# }

dgkf/scriptgloss documentation built on June 8, 2019, 8:43 p.m.