chevron_t
chevron_tlg-class.Rd
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
Usage
chevron_t(
main = function(adam_db, ...) build_table(basic_table(), adam_db[[1]]),
preprocess = function(adam_db, ...) adam_db,
postprocess = report_null,
adam_datasets = NA_character_,
...
)
chevron_l(
main = function(adam_db, ...) data.frame(),
preprocess = function(adam_db, ...) adam_db,
postprocess = function(tlg, ...) tlg,
adam_datasets = NA_character_,
...
)
chevron_g(
main = function(adam_db, ...) ggplot2::ggplot(),
preprocess = function(adam_db, ...) adam_db,
postprocess = function(tlg, ...) tlg,
adam_datasets = NA_character_,
...
)
Arguments
- main
(
function
) returning atlg
, withadam_db
as first argument. Typically one of the_main
function ofchevron
.- preprocess
(
function
) returning a pre-processeddm
object, withadam_db
as first argument. Typically one of the_pre
function ofchevron
.- postprocess
(
function
) returning a post-processedtlg
, withtlg
as first argument.- adam_datasets
(
character
) representing the names of the tables from anADaM
data set required fortlg
creation.- ...
not used
Slots
main
(
function
) returning atlg
. Typically one of the*_main
function fromchevron
.preprocess
(
function
) returning a pre-processeddm
object amenable totlg
creation. Typically one of the*_pre
function fromchevron
.postprocess
(
function
) returning a post-processedtlg
.adam_datasets
(
character
) representing the name of the tables from anAdAM
dataset required fortlg
creation.
Note
To ensure the correct execution of the workflow additional validation criteria are:
the first argument of the
main
function must beadam_db
, the inputdm
object to pre-process. The...
argument is mandatory.the first argument of the
preprocess
function must beadam_db
, the inputdm
object to createtlg
output. The...
argument is mandatory.the first argument of the
postprocess
function must betlg
, the inputTableTree
object to post-process. The...
argument is mandatory.
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)
)