chevron_tlg-class {chevron}R Documentation

chevron_t

Description

chevron_t, a subclass of chevron_tlg with specific validation criteria to handle table creation

chevron_l, a subclass of chevron_tlg with specific validation criteria to handle listing creation

chevron_g, a subclass of chevron_tlg with specific validation criteria to handle graph creation

chevron_simple, a subclass of chevron_tlg, where main function is a simple call

Usage

chevron_t(
  main = function(adam_db, ...) build_table(basic_table(), adam_db[[1]]),
  preprocess = function(adam_db, ...) adam_db,
  postprocess = report_null,
  ...
)

chevron_l(
  main = function(adam_db, ...) data.frame(),
  preprocess = function(adam_db, ...) adam_db,
  postprocess = function(tlg, ...) tlg,
  ...
)

chevron_g(
  main = function(adam_db, ...) ggplot2::ggplot(),
  preprocess = function(adam_db, ...) adam_db,
  postprocess = function(tlg, ...) tlg,
  ...
)

chevron_simple()

Arguments

main

(function) returning a tlg, with adam_db as first argument. Typically one of the ⁠_main⁠ function of chevron.

preprocess

(function) returning a pre-processed list of data.frames, with adam_db as first argument. Typically one of the ⁠_pre⁠ function of chevron.

postprocess

(function) returning a post-processed tlg, with tlg as first argument.

...

not used

Value

a chevron_t class object.

a chevron_l class object.

a chevron_g class object.

a chevron_simple class object.

Slots

main

(function) returning a tlg. Typically one of the ⁠*_main⁠ function from chevron.

preprocess

(function) returning a pre-processed list of data.frames amenable to tlg creation. Typically one of the ⁠*_pre⁠ function from chevron.

postprocess

(function) returning a post-processed tlg. Typically one of the ⁠*_post⁠ function from chevron.

Note

To ensure the correct execution of the workflow, additional validation criteria are:

Examples

chevron_t_obj <- chevron_t()
chevron_t_obj <- chevron_t(postprocess = function(tlg, indent, ...) {
  rtables::table_inset(tlg) <- indent
  tlg
})

chevron_l_obj <- chevron_l()

chevron_g_obj <- chevron_g()
chevron_g_obj <- chevron_g(
  postprocess = function(tlg, title, ...) tlg + ggplot2::labs(main = title)
)

chevron_simple_obj <- chevron_simple()

[Package chevron version 0.2.6 Index]