after: Executes modifications to the result of a module

View source: R/after.R

afterR Documentation

Executes modifications to the result of a module

Description

[Experimental]

Exported to be able to use methods not to be used directly by module-developers or app-users. Primarily used to modify the output object of module.

Usage

after(x, server = function(input, output, session, data) data, ...)

Arguments

x

(teal_module or teal_modules).

server

(⁠function(input, output, session, data, ...)⁠) function to receive output data from tm$server. Must return data

...

Additional arguments passed to the server wrapper function by matching their formal names.

Value

A teal_module or teal_modules object with a wrapped server.

See Also

disable_src(), disable_report()

Examples

library("teal.reporter")
hide_code <- function(input, output, session, data) {
  teal_card(data) <- Filter(function(x) !inherits(x, "code_chunk"), teal_card(data))
  data
}
app <- init(
  data = teal_data(IRIS = iris, MTCARS = mtcars),
  modules = example_module() |>
    after(server = hide_code)
)

if (interactive()) {
  runApp(app)
}

teal documentation built on June 30, 2026, 5:11 p.m.