Type: Package
Title: Standard TLGs for Clinical Trials Reporting
Version: 0.2.12
Date: 2025-06-18
Description: Provide standard tables, listings, and graphs (TLGs) libraries used in clinical trials. This package implements a structure to reformat the data with 'dunlin', create reporting tables using 'rtables' and 'tern' with standardized input arguments to enable quick generation of standard outputs. In addition, it also provides comprehensive data checks and script generation functionality.
License: Apache License 2.0
URL: https://insightsengineering.github.io/chevron/, https://github.com/insightsengineering/chevron/
BugReports: https://github.com/insightsengineering/chevron/issues
Depends: R (≥ 4.1.0)
Imports: checkmate (≥ 2.1.0), dplyr (≥ 1.1.0), dunlin (≥ 0.1.10), forcats (≥ 1.0.0), formatters (≥ 0.5.11), ggplot2 (≥ 3.4.0), glue (≥ 1.0.0), grid, lifecycle (≥ 0.2.0), lubridate (≥ 1.7.8), magrittr (≥ 1.5), methods, nestcolor (≥ 0.1.1), purrr (≥ 0.3.0), rlang (≥ 1.0.0), rlistings (≥ 0.2.12), rtables (≥ 0.6.13), stringr (≥ 1.4.1), tern (≥ 0.9.9), tibble (≥ 2.0.0), utils
Suggests: knitr (≥ 1.42), rmarkdown (≥ 2.23), testthat (≥ 3.0.4), tidyr (≥ 0.8.3), vdiffr (≥ 1.0.7), withr (≥ 2.1.0)
VignetteBuilder: knitr, rmarkdown
Config/Needs/verdepcheck: mllg/checkmate, tidyverse/dplyr, insightsengineering/dunlin, tidyverse/forcats, insightsengineering/formatters, tidyverse/ggplot2, tidyverse/glue, r-lib/lifecycle, tidyverse/lubridate, tidyverse/magrittr, insightsengineering/nestcolor, tidyverse/purrr, r-lib/rlang, insightsengineering/rlistings, insightsengineering/rtables, tidyverse/stringr, insightsengineering/tern, tidyverse/tibble, yihui/knitr, rstudio/rmarkdown, r-lib/testthat, tidyverse/tidyr, r-lib/vdiffr, r-lib/withr
Config/Needs/website: insightsengineering/nesttemplate
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
RoxygenNote: 7.3.2
Collate: 'report_null.R' 'utils.R' 'chevron_tlg-S4class.R' 'ael01_nollt.R' 'ael02.R' 'ael03.R' 'aet01.R' 'aet01_aesi.R' 'aet02.R' 'aet03.R' 'aet04.R' 'aet05.R' 'aet05_all.R' 'aet10.R' 'assertions.R' 'cfbt01.R' 'checks.R' 'chevron_tlg-S4methods.R' 'cml02a_gl.R' 'cmt01a.R' 'cmt02_pt.R' 'coxt01.R' 'coxt02.R' 'data.R' 'dmt01.R' 'dst01.R' 'dtht01.R' 'dummy_template.R' 'egt01.R' 'egt02.R' 'egt03.R' 'egt05_qtcat.R' 'ext01.R' 'fstg01.R' 'fstg02.R' 'gen_args.R' 'kmg01.R' 'lbt01.R' 'lbt04.R' 'lbt05.R' 'lbt06.R' 'lbt07.R' 'lbt14.R' 'lbt15.R' 'mht01.R' 'mng01.R' 'package.R' 'pdt01.R' 'pdt02.R' 'reexports.R' 'rmpt01.R' 'rmpt03.R' 'rmpt04.R' 'rmpt05.R' 'rmpt06.R' 'rspt01.R' 'rtables_utils.R' 'standard_rules.R' 'ttet01.R' 'unwrap.R' 'vst01.R' 'vst02.R' 'zzz.R'
NeedsCompilation: no
Packaged: 2025-06-20 13:18:36 UTC; falquetb
Author: Liming Li ORCID iD [aut] (Original creator of the package), Benoit Falquet ORCID iD [aut] (Original creator of the package), Xiaoli Duan [aut], Adrian Waddell [ctb], Chenkai Lv [ctb], Pawel Rucki [ctb], Tim Barnett [ctb], Tian Fang [ctb], Joe Zhu ORCID iD [cre], F. Hoffmann-La Roche AG [cph, fnd]
Maintainer: Joe Zhu <joe.zhu@roche.com>
Repository: CRAN
Date/Publication: 2025-06-20 14:10:02 UTC

chevron package

Description

Provide standard tables, listings, and graphs (TLGs) libraries used in clinical trials. This package implements a structure to reformat the data with 'dunlin', create reporting tables using 'rtables' and 'tern' with standardized input arguments to enable quick generation of standard outputs. In addition, it also provides comprehensive data checks and script generation functionality.

Author(s)

Maintainer: Joe Zhu joe.zhu@roche.com (ORCID)

Authors:

Other contributors:

See Also

Useful links:


AEL01_NOLLT Listing 1 (Default) Glossary of Preferred Terms and Investigator-Specified Terms.

Description

AEL01_NOLLT Listing 1 (Default) Glossary of Preferred Terms and Investigator-Specified Terms.

Usage

ael01_nollt_main(
  adam_db,
  dataset = "adae",
  key_cols = c("AEBODSYS", "AEDECOD"),
  disp_cols = "AETERM",
  split_into_pages_by_var = NULL,
  unique_rows = TRUE,
  ...
)

ael01_nollt_pre(
  adam_db,
  dataset = "adae",
  key_cols = c("AEBODSYS", "AEDECOD"),
  disp_cols = "AETERM",
  ...
)

ael01_nollt

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

key_cols

(character) names of columns that should be treated as key columns when rendering the listing. Key columns allow you to group repeat occurrences.

disp_cols

(character) names of non-key columns which should be displayed when the listing is rendered.

split_into_pages_by_var

(character or NULL) the name of the variable to split the listing by.

unique_rows

(flag) whether to keep only unique rows in listing.

...

additional arguments passed to rlistings::as_listing.

Format

An object of class chevron_l of length 1.

Details

Value

the main function returns an rlistings or a list object.

the preprocessing function returns a list of data.frame.

Functions

Note

Examples

run(ael01_nollt, syn_data)

AEL02 Listing 1 (Default) Listing of Adverse Events.

Description

AEL02 Listing 1 (Default) Listing of Adverse Events.

Usage

ael02_main(
  adam_db,
  dataset = "adae",
  key_cols = c("ID", "ASR"),
  disp_cols = c("AEDECOD", "TRTSDTM", "ASTDY", "ADURN", "AESER", "ASEV", "AREL", "AEOUT",
    "AECONTRT", "AEACN"),
  split_into_pages_by_var = "ACTARM",
  unique_rows = FALSE,
  ...
)

ael02_pre(adam_db, dataset = "adae", arm_var = "ACTARM", ...)

ael02

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

key_cols

(character) names of columns that should be treated as key columns when rendering the listing. Key columns allow you to group repeat occurrences.

disp_cols

(character) names of non-key columns which should be displayed when the listing is rendered.

split_into_pages_by_var

(character or NULL) the name of the variable to split the listing by.

unique_rows

(flag) whether to keep only unique rows in listing.

...

not used.

arm_var

(string) variable used for column splitting

Format

An object of class chevron_l of length 1.

Value

the main function returns an rlistings or a list object.

the preprocessing function returns a list of data.frame.

Functions

Examples

res <- run(ael02, syn_data)

AEL03 Listing 1 (Default) Listing of Serious Adverse Events.

Description

AEL03 Listing 1 (Default) Listing of Serious Adverse Events.

Usage

ael03_main(
  adam_db,
  dataset = "adae",
  key_cols = c("ID", "ASR"),
  disp_cols = c("AEDECOD", "TRTSDTM", "ASTDY", "ADURN", "ASEV", "AREL", "AEOUT",
    "AECONTRT", "AEACN", "SERREAS"),
  split_into_pages_by_var = "ACTARM",
  unique_rows = FALSE,
  ...
)

ael03_pre(adam_db, dataset = "adae", arm_var = "ACTARM", ...)

ael03

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

key_cols

(character) names of columns that should be treated as key columns when rendering the listing. Key columns allow you to group repeat occurrences.

disp_cols

(character) names of non-key columns which should be displayed when the listing is rendered.

split_into_pages_by_var

(character or NULL) the name of the variable to split the listing by.

unique_rows

(flag) whether to keep only unique rows in listing.

...

not used.

arm_var

(string) variable used for column splitting

Format

An object of class chevron_l of length 1.

Value

the main function returns an rlistings or a list object.

Functions

Examples

res <- run(ael03, syn_data)

aet01_aesi Layout

Description

aet01_aesi Layout

Usage

aet01_aesi_lyt(arm_var, aesi_vars, lbl_overall, lbl_aesi_vars, grade_groups)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_aesi_vars

(character) the labels of the AESI variables to be summarized.

Value

a PreDataTableLayouts object.


AET01_AESI Table 1 (Default) Adverse Event of Special Interest Summary Table.

Description

AET01_AESI Table 1 (Default) Adverse Event of Special Interest Summary Table.

Usage

aet01_aesi_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  aesi_vars = NULL,
  grade_groups = NULL,
  ...
)

aet01_aesi_pre(adam_db, ...)

aet01_aesi_post(tlg, prune_0 = FALSE, ...)

aet01_aesi

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

aesi_vars

(character) the AESI variables to be included in the summary. Defaults to NA.

grade_groups

(list) the grade groups to be displayed.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(aet01_aesi, syn_data)

aet01 Layout

Description

aet01 Layout

Usage

aet01_lyt(arm_var, lbl_overall, anl_vars, anl_lbls, lbl_vars)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

anl_vars

Named (list) of analysis variables.

anl_lbls

(character) of labels.

lbl_vars

Named (list) of analysis labels.

Value

a PreDataTableLayouts object.


AET01 Table 1 (Default) Overview of Deaths and Adverse Events Summary Table 1.

Description

AET01 Table 1 (Default) Overview of Deaths and Adverse Events Summary Table 1.

Usage

aet01_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  anl_vars = list(safety_var = c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD",
    "DSM", "REL", "RELWD", "RELDSM", "SEV")),
  anl_lbls = "Total number of {patient_label} with at least one",
  show_wd = TRUE,
  ...
)

aet01_pre(adam_db, ...)

aet01_post(tlg, prune_0 = FALSE, ...)

aet01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

anl_vars

Named (list) of (character) variables the safety variables to be summarized.

anl_lbls

(character) of analysis labels.

show_wd

(flag) whether to display the number of patients withdrawn from study due to an adverse event and the number of death.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(aet01, syn_data, arm_var = "ARM")

AET02 Table 1 (Default) Adverse Events by System Organ Class and Preferred Term Table 1.

Description

The AET02 table provides an overview of the number of subjects experiencing adverse events and the number of advert events categorized by Body System and Dictionary-Derived Term.

Usage

aet02_label

aet02_main(
  adam_db,
  arm_var = "ACTARM",
  row_split_var = "AEBODSYS",
  lbl_overall = NULL,
  summary_labels = list(all = aet02_label, TOTAL = c(nonunique =
    "Overall total number of events")),
  ...
)

aet02_pre(adam_db, row_split_var = "AEBODSYS", ...)

aet02_post(tlg, row_split_var = "AEBODSYS", prune_0 = TRUE, ...)

aet02

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

row_split_var

(character) additional row split variables.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summary_labels

(list) of summarize labels. See details.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class character of length 2.

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(aet02, syn_data)

aet03 Layout

Description

aet03 Layout

Usage

aet03_lyt(arm_var, lbl_overall, lbl_aebodsys, lbl_aedecod, intensity_grade)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_aebodsys

(string) text label for AEBODSYS.

lbl_aedecod

(string) text label for AEDECOD.

intensity_grade

(character) describing the intensity levels present in the dataset.

Value

a PreDataTableLayouts object.


AET03 Table 1 (Default) Advert Events by Greatest Intensity Table 1.

Description

An adverse events table categorized by System Organ Class, Dictionary-Derived Term and Greatest intensity.

Usage

aet03_main(adam_db, arm_var = "ACTARM", lbl_overall = NULL, ...)

aet03_pre(adam_db, ...)

aet03_post(tlg, prune_0 = TRUE, ...)

aet03

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(aet03, syn_data)

aet04 Layout

Description

aet04 Layout

Usage

aet04_lyt(
  arm_var,
  total_var,
  lbl_overall,
  lbl_aebodsys,
  lbl_aedecod,
  grade_groups
)

Arguments

arm_var

(string) variable used for column splitting

total_var

(string) variable to create summary of all variables.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_aebodsys

(string) text label for AEBODSYS.

lbl_aedecod

(string) text label for AEDECOD.

grade_groups

(list) putting in correspondence toxicity grades and labels.

Value

a PreDataTableLayouts object.


AET04 Table 1 (Default) Adverse Events by Highest NCI CTACAE AE Grade Table 1.

Description

The AET04 table provides an overview of adverse event with the highest NCI CTCAE grade per individual.

Usage

aet04_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  grade_groups = NULL,
  ...
)

aet04_pre(adam_db, ...)

aet04_post(tlg, prune_0 = TRUE, ...)

aet04

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

grade_groups

(list) putting in correspondence toxicity grades and labels.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

grade_groups <- list(
  "Grade 1-2" = c("1", "2"),
  "Grade 3-4" = c("3", "4"),
  "Grade 5" = c("5")
)
proc_data <- dunlin::log_filter(syn_data, AEBODSYS == "cl A.1", "adae")
run(aet04, proc_data, grade_groups = grade_groups)

AET05_ALL Table 1 (Default) Adverse Event Rate Adjusted for Patient-Years at Risk - All Occurrences.

Description

The AET05_ALL table produces the standard adverse event rate adjusted for patient-years at risk summary considering all occurrences.

Usage

aet05_all_pre(adam_db, dataset = "adsaftte", ...)

aet05_all

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

...

not used.

Format

An object of class chevron_t of length 1.

Value

the preprocessing function returns a list of data.frame.

Functions

Examples

library(dplyr)
library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "AETOT1" | PARAMCD == "AEREPTTE", "adsaftte")

run(aet05_all, proc_data)

run(aet05_all, proc_data, conf_level = 0.90, conf_type = "exact")

aet05 Layout

Description

aet05 Layout

Usage

aet05_lyt(arm_var, lbl_overall, param_label, vars, n_events, control)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

param_label

(string) variable for parameter code.

vars

(string) variable for the primary analysis variable to be iterated over.

n_events

(string) variable to count the number of events observed.

control

(list) parameters for estimation details, specified by using the helper function control_incidence_rate().

Value

a PreDataTableLayouts object.


AET05 Table 1 (Default) Adverse Event Rate Adjusted for Patient-Years at Risk - First Occurrence.

Description

The AET05 table produces the standard adverse event rate adjusted for patient-years at risk summary considering first occurrence.

Usage

aet05_main(
  adam_db,
  dataset = "adsaftte",
  arm_var = "ACTARM",
  lbl_overall = NULL,
  ...
)

aet05_pre(adam_db, dataset = "adsaftte", ...)

aet05_post(tlg, prune_0 = FALSE, ...)

aet05

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) the arm variable used for arm splitting.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

...

Further arguments passed to tern::control_incidence_rate().

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

library(dplyr)
library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "AETTE1", "adsaftte")

run(aet05, proc_data)

run(aet05, proc_data, conf_level = 0.90, conf_type = "exact")

aet10 Layout

Description

aet10 Layout

Usage

aet10_lyt(arm_var, lbl_overall, lbl_aedecod)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_aedecod

(character) text label for AEDECOD.

Value

a PreDataTableLayouts object.


AET10 Table 1 (Default) Most Common (xx%) Adverse Events Preferred Terms Table 1.

Description

The AET10 table Include Adverse Events occurring with user-specified threshold X% in at least one of the treatment groups. Standard table summarized by preferred term (PT). Order the data by total column frequency from most to least frequently reported PT (regardless of SOC).

Usage

aet10_main(adam_db, arm_var = "ACTARM", lbl_overall = NULL, ...)

aet10_pre(adam_db, ...)

aet10_post(tlg, atleast = 0.05, ...)

aet10

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

atleast

given cut-off in numeric format, default is 0.05

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(aet10, syn_data)

Analyze with defined precision

Description

Analyze with defined precision

Usage

afun_p(
  x,
  .N_col,
  .spl_context,
  precision,
  .N_row,
  .var = NULL,
  .df_row = NULL,
  .stats = NULL,
  .labels = NULL,
  .indent_mods = NULL,
  ...
)

Arguments

x

value to analyze

.N_col

(int) See tern::analyze_variables.

.spl_context

split context.

precision

(named list of integer) where names of columns found in .df_row and the values indicate the number of digits in statistics for numeric value. If default is set, and parameter precision not specified, the value for default will be used. If neither are provided, auto determination is used. See tern::format_auto.

.N_row

(int) See tern::analyze_variables.

.var

variable name.

.stats

(named list of character) where names of columns found in .df_row and the values indicate the statistical analysis to perform. If default is set, and parameter precision not specified, the value for default will be used.

.labels

(character) See tern::analyze_variables.

.indent_mods

(integer) See tern::analyze_variables.

...

additional arguments for tern::a_summary.


Analyze skip baseline

Description

Analyze skip baseline

Usage

afun_skip(
  x,
  .var,
  .spl_context,
  paramcdvar,
  visitvar,
  skip,
  precision,
  .stats,
  .labels = NULL,
  .indent_mods = NULL,
  .N_col,
  .N_row,
  ...
)

Arguments

x

value to analyze

.var

variable name.

.spl_context

split context.

paramcdvar

(string) name of parameter code.

visitvar

(string) name of the visit variable.

skip

Named (character) indicating the pairs to skip in analyze.

precision

(named list of integer) where names are values found in the PARAMCD column and the values indicate the number of digits in statistics. If default is set, and parameter precision not specified, the value for default will be used. If default is not set, the default precision is 2.

.stats

(character) See tern::analyze_variables.

.labels

(character) See tern::analyze_variables.

.indent_mods

(integer) See tern::analyze_variables.

.N_col

(int) See tern::analyze_variables.

.N_row

(int) See tern::analyze_variables.

...

additional arguments for tern::a_summary.


Get Arguments List

Description

Get Arguments List

Usage

args_ls(x, simplify = FALSE, omit = NULL)

## S4 method for signature 'chevron_tlg'
args_ls(x, simplify = FALSE, omit = NULL)

Arguments

x

(chevron_tlg) input.

simplify

(flag) whether to simplify the output, coalescing the values of the parameters. The order of priority for the value of the parameters is: main, preprocess and postprocess.

omit

(character) the names of the argument to omit from the output.

Value

a list of the formal arguments with their default for the functions stored in the chevron_tlg object passed a x argument.

Examples

args_ls(aet01, simplify = TRUE)

Check variable only has one unique value.

Description

Check variable only has one unique value.

Usage

assert_single_value(x, label = deparse(substitute(x)))

Arguments

x

value vector.

label

(string) label of input.

Value

invisible NULL or an error message if the criteria are not fulfilled.


Check variable is of correct type

Description

Check variable is of correct type

Usage

assert_valid_type(x, types, label = deparse(substitute(x)))

Arguments

x

Object to check the type.

types

(character) possible types to check.

label

(string) label.

Value

invisible NULL or an error message if the criteria are not fulfilled.


Check whether var is valid

Description

Check whether var is valid

Usage

assert_valid_var(x, label, na_ok, empty_ok, ...)

## S3 method for class 'character'
assert_valid_var(
  x,
  label = deparse(substitute(x)),
  na_ok = FALSE,
  empty_ok = FALSE,
  min_chars = 1L,
  ...
)

## S3 method for class 'factor'
assert_valid_var(
  x,
  label = deparse(substitute(x)),
  na_ok = FALSE,
  empty_ok = FALSE,
  min_chars = 1L,
  ...
)

## S3 method for class 'logical'
assert_valid_var(
  x,
  label = deparse(substitute(x)),
  na_ok = TRUE,
  empty_ok = FALSE,
  ...
)

## S3 method for class 'numeric'
assert_valid_var(
  x,
  label = deparse(substitute(x)),
  na_ok = TRUE,
  empty_ok = FALSE,
  integerish = FALSE,
  ...
)

## S3 method for class 'POSIXct'
assert_valid_var(
  x,
  label = deparse(substitute(x)),
  na_ok = TRUE,
  empty_ok = FALSE,
  tzs = OlsonNames(),
  ...
)

## Default S3 method:
assert_valid_var(
  x,
  label = deparse(substitute(x)),
  na_ok = FALSE,
  empty_ok = FALSE,
  ...
)

Arguments

x

value of col_split variable

label

(string) hints.

na_ok

(flag) whether NA value is allowed

empty_ok

(flag) whether length 0 value is allowed.

...

Further arguments to methods.

min_chars

(integer) the minimum length of the characters.

integerish

(flag) whether the number should be treated as integerish.

tzs

(character) time zones.

Details

This function checks the variable values are valid or not.

Value

invisible NULL or an error message if the criteria are not fulfilled.


Check variables are of same levels

Description

Check variables are of same levels

Usage

assert_valid_var_pair(
  df1,
  df2,
  var,
  lab1 = deparse(substitute(df1)),
  lab2 = deparse(substitute(df2))
)

Arguments

df1

(data.frame) input.

df2

(data.frame) input.

var

(string) variable to check.

lab1

(string) label hint for df1.

lab2

(string) label hint for df2.

Value

invisible NULL or an error message if the criteria are not fulfilled.


Check variables in a data frame are valid character or factor.

Description

Check variables in a data frame are valid character or factor.

Usage

assert_valid_variable(
  df,
  vars,
  label = deparse(substitute(df)),
  types = NULL,
  ...
)

Arguments

df

(data.frame) input dataset.

vars

(character) variables to check.

label

(string) labels of the data frame.

types

Named (list) of type of the input.

...

further arguments for assert_valid_var. Please note that different methods have different arguments so if provided make sure the variables to check is of the same class.

Value

invisible TRUE or an error message if the criteria are not fulfilled.


cfbt01 Layout

Description

cfbt01 Layout

Usage

cfbt01_lyt(
  arm_var,
  lbl_overall,
  lbl_avisit,
  lbl_param,
  summaryvars,
  summaryvars_lbls,
  row_split_var,
  row_split_lbl,
  visitvar,
  precision,
  page_var,
  .stats,
  skip,
  ...
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_avisit

(string) label of the visitvar variable.

lbl_param

(string) label of the PARAM variable.

summaryvars

(character) the variables to be analyzed. For this table, AVAL and CHG by default.

summaryvars_lbls

(character) the label of the variables to be analyzed.

row_split_var

(character) additional row split variables.

row_split_lbl

(character) label of further row splits.

visitvar

(string) typically one of "AVISIT" or user-defined visit incorporating "ATPT".

precision

(named list of integer) where names are values found in the PARAMCD column and the values indicate the number of digits in statistics. If default is set, and parameter precision not specified, the value for default will be used. If default is not set, the default precision is 2.

page_var

(string) variable name prior to which the row split is by page.

.stats

(character) statistics names, see tern::analyze_vars().

skip

Named (list) of visit values that need to be inhibited.

...

not used.

Value

a PreDataTableLayouts object.


CFBT01 Change from Baseline By Visit Table.

Description

The CFBT01 table provides an overview of the actual values and its change from baseline of each respective arm over the course of the trial.

Usage

cfbt01_main(
  adam_db,
  dataset,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  row_split_var = NULL,
  summaryvars = c("AVAL", "CHG"),
  visitvar = "AVISIT",
  precision = list(default = 2L),
  page_var = "PARAMCD",
  .stats = c("n", "mean_sd", "median", "range"),
  skip = list(CHG = "BASELINE"),
  ...
)

cfbt01_pre(adam_db, dataset, ...)

cfbt01_post(tlg, prune_0 = TRUE, ...)

cfbt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) additional row split variables.

summaryvars

(character) variables to be analyzed. The label attribute of the corresponding column in table of adam_db is used as label.

visitvar

(string) typically one of "AVISIT" or user-defined visit incorporating "ATPT".

precision

(named list of integer) where names are values found in the PARAMCD column and the values indicate the number of digits in statistics. If default is set, and parameter precision not specified, the value for default will be used. If default is not set, the default precision is 2.

page_var

(string) variable name prior to which the row split is by page.

.stats

(character) statistics names, see tern::analyze_vars().

skip

Named (list) of visit values that need to be inhibited.

...

additional arguments like .indent_mods, .labels.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

library(dunlin)

proc_data <- log_filter(
  syn_data,
  PARAMCD %in% c("DIABP", "SYSBP"), "advs"
)
run(cfbt01, proc_data, dataset = "advs")

Check that all names are among column names

Description

Check that all names are among column names

Usage

check_all_colnames(df, x, null_ok = TRUE, qualifier = NULL)

Arguments

df

(data.frame)

x

(character) the names of the columns to be checked.

null_ok

(flag) can x be NULL.

qualifier

(string) to be returned if the check fails.

Value

invisible NULL or a string if the criteria are not fulfilled.


Check that at least one name is among column names

Description

Check that at least one name is among column names

Usage

check_one_colnames(df, x, null_ok = TRUE, qualifier = NULL)

Arguments

df

(data.frame)

x

(character) the names of the columns to be checked.

null_ok

(flag) can x be NULL.

qualifier

(string) to be returned if the check fails.

Value

invisible NULL or a string if the criteria are not fulfilled.


chevron_tlg class

Description

The chevron_tlg S4 class associates a preprocess function, a main tlg function and a postprocess function.

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 = std_postprocessing,
  dataset = NULL,
  ...
)

chevron_l(
  main = function(adam_db, ...) data.frame(),
  preprocess = function(adam_db, ...) adam_db,
  postprocess = std_postprocessing,
  dataset = NULL,
  ...
)

chevron_g(
  main = function(adam_db, ...) ggplot2::ggplot(),
  preprocess = function(adam_db, ...) adam_db,
  postprocess = std_postprocessing,
  dataset = NULL,
  ...
)

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.

dataset

(string) the name of a table in the adam_db object.

...

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.

dataset

(character) the names of the data sets used in the chevron_tlg object. If NULL, all data sets are possibly used.

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()

CML02A_GL Listing 1 (Default) Concomitant Medication Class Level 2, Preferred Name, and Investigator-Specified Terms.

Description

CML02A_GL Listing 1 (Default) Concomitant Medication Class Level 2, Preferred Name, and Investigator-Specified Terms.

Usage

cml02a_gl_main(
  adam_db,
  dataset = "adcm",
  key_cols = c("ATC2", "CMDECOD"),
  disp_cols = c("ATC2", "CMDECOD", "CMTRT"),
  split_into_pages_by_var = NULL,
  unique_rows = TRUE,
  ...
)

cml02a_gl_pre(
  adam_db,
  dataset = "adcm",
  disp_cols = c("ATC2", "CMDECOD", "CMTRT"),
  ...
)

cml02a_gl

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

key_cols

(character) names of columns that should be treated as key columns when rendering the listing. Key columns allow you to group repeat occurrences.

disp_cols

(character) names of non-key columns which should be displayed when the listing is rendered.

split_into_pages_by_var

(character or NULL) the name of the variable to split the listing by.

unique_rows

(flag) whether to keep only unique rows in listing.

...

not used.

Format

An object of class chevron_l of length 1.

Value

the main function returns an rlistings or a list object.

the preprocessing function returns a list of data.frame.

Functions

Examples

run(cml02a_gl, syn_data)

CMT01A Concomitant Medication by Medication Class and Preferred Name.

Description

A concomitant medication table with the number of subjects and the total number of treatments by medication class.

Usage

cmt01_label

cmt01a_main(
  adam_db,
  arm_var = "ARM",
  lbl_overall = NULL,
  row_split_var = "ATC2",
  medname_var = "CMDECOD",
  summary_labels = setNames(rep(list(cmt01_label), length(row_split_var) + 1L),
    c("TOTAL", row_split_var)),
  ...
)

cmt01a_pre(adam_db, ...)

cmt01a_post(
  tlg,
  prune_0 = TRUE,
  sort_by_freq = FALSE,
  row_split_var = "ATC2",
  medname_var = "CMDECOD",
  ...
)

cmt01a

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) the variable defining the medication category. By default ATC2.

medname_var

(string) variable name of medical treatment name.

summary_labels

(list) of summarize labels. See details.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

sort_by_freq

(flag) whether to sort medication class by frequency.

Format

An object of class character of length 2.

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

library(dplyr)

proc_data <- syn_data
proc_data$adcm <- proc_data$adcm %>%
  filter(ATIREL == "CONCOMITANT")

run(cmt01a, proc_data)

CMT02_PT Table 1 (Default) Concomitant Medications by Preferred Name.

Description

A concomitant medication table with the number of subjects and the total number of treatments by medication name sorted by frequencies.

Usage

cmt02_pt_main(
  adam_db,
  arm_var = "ARM",
  lbl_overall = NULL,
  row_split_var = NULL,
  medname_var = "CMDECOD",
  summary_labels = list(TOTAL = cmt01_label),
  ...
)

cmt02_pt_pre(adam_db, ...)

cmt02_pt_post(
  tlg,
  prune_0 = TRUE,
  sort_by_freq = FALSE,
  row_split_var = NULL,
  medname_var = "CMDECOD",
  ...
)

cmt02_pt

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) the variable defining the medication category. By default ATC2.

medname_var

(string) variable name of medical treatment name.

summary_labels

(list) of summarize labels. See details.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

sort_by_freq

(flag) whether to sort medication class by frequency.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(cmt02_pt, syn_data)

Helper function to convert to months if needed

Description

Helper function to convert to months if needed

Usage

convert_to_month(x, unit)

Arguments

x

(numeric) time.

unit

(character) or (factor) time unit.

Value

A numeric vector with the time in months.


Count Children

Description

Count Children

Usage

count_children(x)

Count or summarize by groups

Description

Count or summarize by groups

Usage

count_or_summarize(lyt, var, level, detail_vars, indent_mod = 0L, ...)

Arguments

lyt

(PreDataTableLayouts) rtable layout.

var

(string) of analysis variable.

level

(string) level to be displayed.

detail_vars

(character) of variables for detail information.


Count patients recursively

Description

Count patients recursively

Usage

count_patients_recursive(lyt, anl_vars, anl_lbls, lbl_vars)

Arguments

lyt

(PreDataTableLayouts) rtable layout.

anl_vars

Named (list) of analysis variables.

anl_lbls

(character) of labels.

lbl_vars

Named (list) of analysis labels.


COXT01 Layout

Description

COXT01 Layout

Usage

coxt01_lyt(variables, col_split, lbl_vars, control, multivar, ...)

Arguments

variables

(list) list of variables in a Cox proportional hazards regression model.

lbl_vars

(string) text label for the a Cox regression model variables.

multivar

(flag) indicator of whether multivariate cox regression is conducted.

...

Further arguments passed to tern::control_coxreg().

Value

a PreDataTableLayouts object.


COXT01 (Default) Cox Regression Model Table.

Description

Cox models are the most commonly used methods to estimate the magnitude of the effect in survival analyses. It assumes proportional hazards; that is, it assumes that the ratio of the hazards of the two groups (e.g. two arms) is constant over time. This ratio is referred to as the "hazard ratio" and is one of the most commonly reported metrics to describe the effect size in survival analysis.

Usage

coxt01_main(
  adam_db,
  arm_var = "ARM",
  time_var = "AVAL",
  event_var = "EVENT",
  covariates = c("SEX", "RACE", "AAGE"),
  strata = NULL,
  lbl_vars = "Effect/Covariate Included in the Model",
  multivar = FALSE,
  ...
)

coxt01_pre(adam_db, arm_var = "ARM", ...)

coxt01_post(tlg, prune_0 = FALSE, ...)

coxt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) the arm variable used for arm splitting.

time_var

(string) the time variable in a Cox proportional hazards regression model.

event_var

(string) the event variable in a Cox proportional hazards regression model.

covariates

(character) will be fitted and the corresponding effect will be estimated.

strata

(character) will be fitted for the stratified analysis.

lbl_vars

(string) text label for the a Cox regression model variables.

multivar

(flag) indicator of whether multivariate cox regression is conducted.

...

Further arguments passed to tern::control_coxreg().

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "CRSD", "adtte")
proc_data <- log_filter(proc_data, ARMCD != "ARM C", "adsl")
run(coxt01, proc_data)

run(coxt01, proc_data, covariates = c("SEX", "AAGE"), strata = c("RACE"), conf_level = 0.90)

COXT02 Multi-Variable Cox Regression Model Table.

Description

The COXT02 table follows the same principles as the general Cox model analysis and produces the estimates for each of the covariates included in the model (usually the main effects without interaction terms).

Usage

coxt02_main(
  adam_db,
  arm_var = "ARM",
  time_var = "AVAL",
  event_var = "EVENT",
  covariates = c("SEX", "RACE", "AAGE"),
  strata = NULL,
  lbl_vars = "Effect/Covariate Included in the Model",
  multivar = TRUE,
  ...
)

coxt02

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) the arm variable used for arm splitting.

time_var

(string) the time variable in a Cox proportional hazards regression model.

event_var

(string) the event variable in a Cox proportional hazards regression model.

covariates

(character) will be fitted and the corresponding effect will be estimated.

strata

(character) will be fitted for the stratified analysis.

lbl_vars

(string) text label for the a Cox regression model variables.

multivar

(flag) indicator of whether multivariate cox regression is conducted.

...

Further arguments passed to tern::control_coxreg().

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

Functions

Note

Examples

library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "CRSD", "adtte")

run(coxt02, proc_data)

run(coxt02, proc_data, covariates = c("SEX", "AAGE"), strata = c("RACE"), conf_level = 0.90)

Concatenate Site and Subject ID

Description

Concatenate Site and Subject ID

Usage

create_id_listings(site, subject, sep = "/")

Arguments

site

(string)

subject

(string)

sep

(string)

Note

the {Patient_label} whisker placeholder will be used in the label.

Examples

create_id_listings("BRA-1", "xxx-1234")

CTC version 4 Grade Direction Data

Description

CTC version 4 Grade Direction Data

Usage

ctcv4_dir

Format

An object of class data.frame with 35 rows and 3 columns.


CTC version 5 Grade Direction Data

Description

CTC version 5 Grade Direction Data

Usage

ctcv5_dir

Format

An object of class data.frame with 35 rows and 3 columns.


Data Set

Description

retrieve or set dataset slot.

Usage

dataset(x)

## S4 method for signature 'chevron_tlg'
dataset(x)

dataset(x) <- value

## S4 replacement method for signature 'chevron_tlg'
dataset(x) <- value

Arguments

x

(chevron_tlg) input.

value

(character or NULL) defining the dataset slot.

Value

the character stored in the dataset slot of the x argument.


Deparse print

Description

Deparse print

Usage

deparse_print(x, indent, max_line = getOption("chevron.arg_max_line", 5L))

dmt01 Layout

Description

dmt01 Layout

Usage

dmt01_lyt(
  arm_var,
  lbl_overall,
  summaryvars,
  summaryvars_lbls,
  stats,
  precision
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summaryvars_lbls

(character) labels corresponding to the analyzed variables.

Value

a PreDataTableLayouts object.


DMT01 Table 1 (Default) Demographics and Baseline Characteristics Table 1.

Description

For each variable, summary statistics are by default based on the number of patients in the corresponding n row.

Usage

dmt01_main(
  adam_db,
  arm_var = "ARM",
  lbl_overall = "All {Patient_label}",
  summaryvars = c("AAGE", "AGEGR1", "SEX", "ETHNIC", "RACE"),
  stats = list(default = c("n", "mean_sd", "median", "range", "count_fraction")),
  precision = list(),
  ...
)

dmt01_pre(adam_db, ...)

dmt01_post(tlg, prune_0 = TRUE, ...)

dmt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summaryvars

(character) variables summarized in demographic table. The label attribute of the corresponding column in adsl table of adam_db is used as label.

stats

(named list of character) where names are strings found in summaryvars and the values indicate the statistical analysis to perform. If default is set, and parameter precision not specified, the value for default will be used.

precision

(named list of integer) where names are strings found in summaryvars and the values indicate the number of digits in statistics for numeric variables. If default is set, and parameter precision not specified, the value for default will be used. If neither are provided, auto determination is used. See tern::format_auto.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(dmt01, syn_data)

Execute a function call

Description

Execute a function call

Usage

do_call(what, args)

Dose Change Rule

Description

Dose Change Rule

Usage

dose_change_rule

Format

An object of class rule (inherits from character) of length 9.


dst01 Layout

Description

dst01 Layout

Usage

dst01_lyt(arm_var, lbl_overall, study_status_var, detail_vars, trt_status_var)

Arguments

arm_var

(string) variable. Usually one of ARM, ACTARM, TRT01A, or TRT01A.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

study_status_var

(string) variable used to define patient status. Default is EOSSTT, however can also be a variable name with the pattern EOPxxSTT where xx must be substituted by 2 digits referring to the analysis period.

detail_vars

Named (list) of grouped display of study_status_var.

trt_status_var

(string) variable of treatment status.

Value

a PreDataTableLayouts object.


DST01 Table 1 (Default) Patient Disposition Table 1.

Description

The DST01 Disposition Table provides an overview of patients study completion. For patients who discontinued the study a reason is provided.

Usage

dst01_main(
  adam_db,
  arm_var = "ARM",
  lbl_overall = "All {Patient_label}",
  study_status_var = "EOSSTT",
  detail_vars = list(Discontinued = c("DCSREAS")),
  trt_status_var = NULL,
  ...
)

dst01_pre(adam_db, ...)

dst01_post(tlg, prune_0 = TRUE, ...)

dst01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable. Usually one of ARM, ACTARM, TRT01A, or TRT01A.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

study_status_var

(string) variable used to define patient status. Default is EOSSTT, however can also be a variable name with the pattern EOPxxSTT where xx must be substituted by 2 digits referring to the analysis period.

detail_vars

Named (list) of grouped display of study_status_var. The names must be subset of unique levels of study_status_var.

trt_status_var

(string) variable of treatment status.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(dst01, syn_data, detail_vars = list(Ongoing = "STDONS"))

run(dst01, syn_data, detail_vars = list(Discontinued = "DCSREAS", Ongoing = "STDONS"))

run(
  dst01, syn_data,
  detail_vars = list(
    Discontinued = c("DCSREASGP", "DCSREAS"),
    Ongoing = "STDONS"
  )
)

dtht01 Layout

Description

dtht01 Layout

Usage

dtht01_lyt(
  arm_var,
  lbl_overall,
  death_flag,
  death_var,
  other_level,
  other_var,
  dose_death_var
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

death_flag

(string) variable name of death flag.

death_var

(string) variable name of death category.

other_level

(string) "Other" level in death category.

other_var

(string) variable name of death cause under "Other".

dose_death_var

(string) variable name of the days from last dose.

Value

a PreDataTableLayouts object.


DTHT01 Table 1 (Default) Death Table.

Description

A description of the causes of death optionally with the breakdown of the OTHER category and/or post-study reporting of death.

Usage

dtht01_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  other_category = FALSE,
  time_since_last_dose = FALSE,
  ...
)

dtht01_pre(adam_db, ...)

dtht01_post(tlg, prune_0 = TRUE, ...)

dtht01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

other_category

(flag) should the breakdown of the OTHER category be displayed.

time_since_last_dose

(flag) should the time to event information be displayed.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(dtht01, syn_data)

run(dtht01, syn_data, other_category = TRUE, time_since_last_dose = TRUE)

Dummy template.

Description

This template creates a dummy output.

Usage

dummy_template

Format

An object of class chevron_simple of length 1.

Examples

run(dummy_template, syn_data)

EGT01 ECG Parameters and Change from Baseline By Visit Table.

Description

The EGT01 table provides an overview of the ECG values and its change from baseline of each respective arm over the course of the trial.

Usage

egt01_main(
  adam_db,
  dataset = "adeg",
  arm_var = "ACTARM",
  lbl_overall = NULL,
  row_split_var = NULL,
  summaryvars = c("AVAL", "CHG"),
  visitvar = "AVISIT",
  precision = list(default = 0L),
  page_var = "PARAMCD",
  .stats = c("n", "mean_sd", "median", "range"),
  skip = list(CHG = "BASELINE"),
  ...
)

egt01_pre(adam_db, dataset = "adeg", ...)

egt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) additional row split variables.

summaryvars

(character) variables to be analyzed. The label attribute of the corresponding column in table of adam_db is used as label.

visitvar

(string) typically one of "AVISIT" or user-defined visit incorporating "ATPT".

precision

(named list of integer) where names are values found in the PARAMCD column and the values indicate the number of digits in statistics. If default is set, and parameter precision not specified, the value for default will be used. If default is not set, the default precision is 2.

page_var

(string) variable name prior to which the row split is by page.

.stats

(character) statistics names, see tern::analyze_vars().

skip

Named (list) of visit values that need to be inhibited.

...

additional arguments like .indent_mods, .labels.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

Functions

Note

default precision is 0.

Examples

run(egt01, syn_data)

EGT02 ECG Abnormalities Table.

Description

ECG Parameters outside Normal Limits Regardless of Abnormality at Baseline Table.

Usage

egt02_1_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  exclude_base_abn = FALSE,
  ...
)

egt02_pre(adam_db, ...)

egt02_post(tlg, ...)

egt02_1

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

exclude_base_abn

(flag) whether baseline abnormality should be excluded.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(egt02_1, syn_data)

EGT02_2 ECG Abnormalities Table.

Description

ECG Parameters outside Normal Limits Among Patients without Abnormality at Baseline Table.

Usage

egt02_2_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  exclude_base_abn = TRUE,
  ...
)

egt02_2

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

exclude_base_abn

(flag) whether baseline abnormality should be excluded.

...

not used.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(egt02_2, syn_data)

egt02 Layout

Description

egt02 Layout

Usage

egt02_lyt(
  arm_var = "ACTARM",
  lbl_overall,
  lbl_vs_assessment = "Assessment",
  lbl_vs_abnormality = "Abnormality",
  exclude_base_abn
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_vs_assessment

(string) the label of the assessment variable.

lbl_vs_abnormality

(string) the label of the abnormality variable.

exclude_base_abn

(flag) whether to exclude subjects with baseline abnormality from numerator and denominator.

Value

a PreDataTableLayouts object.


egt03 Layout

Description

egt03 Layout

Usage

egt03_lyt(
  arm_var,
  splitvar,
  summaryvar,
  lbl_armvar,
  lbl_summaryvars,
  lbl_param,
  page_var
)

Arguments

arm_var

(string) variable used for column splitting

splitvar

(character) variables to be analyzed, typically "ANRIND". Labels of the corresponding columns are used as subtitles.

summaryvar

(character) variables to be analyzed, typically "BNRIND". Labels of the corresponding columns are used as subtitles.

lbl_armvar

(string) label of the arm_var variable.

lbl_summaryvars

(string) label of the summaryvar variable.

page_var

(string) variable name prior to which the row split is by page.

Value

a PreDataTableLayouts object.


EGT03 Shift Table of ECG Interval Data - Baseline versus Minimum or Maximum Post-Baseline.

Description

The EGT03 Table entries provide the number of patients by baseline assessment and minimum or maximum post-baseline assessment. Percentages are based on the total number of patients in a treatment group. Baseline is the patient's last observation prior to initiation of study drug.

Usage

egt03_main(
  adam_db,
  arm_var = "ACTARMCD",
  summaryvar = "BNRIND",
  splitvar = "ANRIND",
  visitvar = "AVISIT",
  page_var = "PARAMCD",
  ...
)

egt03_pre(adam_db, ...)

egt03_post(tlg, prune_0 = FALSE, ...)

egt03

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(character) the arm variables used for row split, typically "ACTARMCD".

summaryvar

(character) variables to be analyzed, typically "BNRIND". Labels of the corresponding columns are used as subtitles.

splitvar

(character) variables to be analyzed, typically "ANRIND". Labels of the corresponding columns are used as subtitles.

visitvar

(string) typically "AVISIT" or user-defined visit incorporating "ATPT".

page_var

(string) variable name prior to which the row split is by page.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "HR", "adeg")
run(egt03, proc_data)

EGT05_QTCAT Layout

Description

EGT05_QTCAT Layout

Usage

egt05_qtcat_lyt(
  arm_var,
  lbl_overall,
  lbl_avisit,
  lbl_param,
  lbl_cat,
  summaryvars,
  summaryvars_lbls,
  row_split_var,
  row_split_lbl,
  visitvar,
  page_var
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_avisit

(string) label of the visitvar variable.

lbl_param

(string) label of the PARAM variable.

lbl_cat

(string) label of the Category of summaryvars variable. Default as Category.

summaryvars

(character) the variables to be analyzed. AVALCAT1 and CHGCAT1 by default.

summaryvars_lbls

(character) the label of the variables to be analyzed.

row_split_var

(character) additional row split variables.

visitvar

(string) typically "AVISIT" or user-defined visit incorporating "ATPT".

page_var

(string) variable name prior to which the row split is by page.

Value

a PreDataTableLayouts object.


EGT05_QTCAT ECG Actual Values and Changes from Baseline by Visit Table.

Description

The EGT05_QTCAT table summarizes several electrocardiogram parameters and their evolution throughout the study.

Usage

egt05_qtcat_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  summaryvars = c("AVALCAT1", "CHGCAT1"),
  row_split_var = NULL,
  visitvar = "AVISIT",
  page_var = NULL,
  ...
)

egt05_qtcat_pre(adam_db, ...)

egt05_qtcat_post(tlg, prune_0 = TRUE, ...)

egt05_qtcat

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summaryvars

(character) variables to be analyzed. The label attribute of the corresponding column in adeg table of adam_db is used as name.

row_split_var

(character) additional row split variables.

visitvar

(string) typically "AVISIT" or user-defined visit incorporating "ATPT".

page_var

(string) variable name prior to which the row split is by page.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(egt05_qtcat, syn_data)

Empty rule

Description

Empty rule

Usage

empty_rule

Format

An object of class rule (inherits from character) of length 0.


Execute function with given arguments

Description

Execute function with given arguments

Usage

execute_with_args(fun, ...)

Details

If the function has ..., this function will not pass other arguments to .... Only named arguments are passed.


Expand list to each split

Description

Expand list to each split

Usage

expand_list(lst, split)

ext01 Layout

Description

ext01 Layout

Usage

ext01_lyt(
  arm_var,
  lbl_overall,
  summaryvars,
  summaryvars_lbls,
  row_split_var,
  row_split_lbl,
  page_var,
  map,
  stats = list(default = c("n", "mean_sd", "median", "range", "count_fraction")),
  precision = list()
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summaryvars

(character) the name of the variable to be analyzed. By default "AVAL".

summaryvars_lbls

(character) the label associated with the analyzed variable.

row_split_var

(character) additional row split variables.

page_var

(string) variable name prior to which the row split is by page.

Value

a PreDataTableLayouts object.


EXT01 Exposure Summary Table.

Description

The EXT01 table provides an overview of the of the exposure of the patients in terms of Total dose administered or missed, and treatment duration.

Usage

ext01_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  summaryvars = "AVAL",
  row_split_var = "PARCAT2",
  page_var = NULL,
  map = NULL,
  stats = list(default = c("n", "mean_sd", "median", "range", "count_fraction")),
  precision = list(default = 0),
  ...
)

ext01_pre(adam_db, ...)

ext01_post(tlg, prune_0 = TRUE, ...)

ext01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summaryvars

(character) variables to be analyzed. The label attribute of the corresponding column in adex table of adam_db is used as label.

row_split_var

(character) additional row split variables.

page_var

(string) variable name prior to which the row split is by page.

map

(data.frame) of mapping for split rows.

stats

(named list of character) where names are values found in the PARAMCD column and the values indicate the statistical analysis to perform. If default is set, and parameter precision not specified, the value for default will be used.

precision

(named list of integer) where names are values found in the PARAMCD column and the values

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(ext01, syn_data)

run(ext01, syn_data, summaryvars = c("AVAL", "AVALCAT1"), prune_0 = FALSE)

levels(syn_data$adex$AVALCAT1) <- c(levels(syn_data$adex$AVALCAT1), "12 months")
map <- data.frame(
  PARAMCD = "TDURD",
  AVALCAT1 = c("< 1 month", "1 to <3 months", ">=6 months", "3 to <6 months", "12 months")
)
run(
  ext01,
  syn_data,
  summaryvars = c("AVAL", "AVALCAT1"),
  prune_0 = FALSE,
  map = map,
  precision = list(TDOSE = 4, default = 4),
  stats = list(TDURD = "n", default = c("n", "count_fraction"))
)

Formatting of date

Description

Formatting of date

Usage

format_date(date_format = "%d%b%Y")

Arguments

date_format

(string) the output format.

Value

a function converting a date into string.

Note

The date is extracted at the location of the measure, not at the location of the system.

Examples

format_date("%d%b%Y")(as.Date("2021-01-01"))
if ("NZ" %in% OlsonNames()) {
  format_date("%d%b%Y")(as.POSIXct("2021-01-01 00:00:01", tz = "NZ"))
}
if ("US/Pacific" %in% OlsonNames()) {
  format_date("%d%b%Y")(as.POSIXct("2021-01-01 00:00:01", tz = "US/Pacific"))
}

FSTG01 Subgroup Analysis of Best Overall Response.

Description

The template produces the subgroup analysis of best overall response graphic.

Usage

fstg01_main(
  adam_db,
  dataset = "adrs",
  arm_var = "ARM",
  rsp_var = "IS_RSP",
  subgroups = c("SEX", "AGEGR1", "RACE"),
  strata_var = NULL,
  stat_var = c("n_tot", "n", "n_rsp", "prop", "or", "ci"),
  ...
)

fstg01_pre(adam_db, ...)

fstg01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) the arm variable name used for group splitting.

rsp_var

(string) the response variable name to flag whether each subject is a binary response or not.

subgroups

(character) the subgroups variable name to list baseline risk factors.

strata_var

(character) required if stratified analysis is performed.

stat_var

(character) the names of statistics to be reported in tabulate_rsp_subgroups.

...

Further arguments passed to g_forest and extract_rsp_subgroups (a wrapper for h_odds_ratio_subgroups_df and h_proportion_subgroups_df). For details, see the documentation in tern. Commonly used arguments include col_symbol_size, col, vline, groups_lists, conf_level, method, label_all, etc.

Format

An object of class chevron_g of length 1.

Details

Value

the main function returns a grob object.

a gTree object.

the preprocessing function returns a list of data.frame.

Functions

Note

Examples

library(dplyr)
library(dunlin)

proc_data <- log_filter(
  syn_data,
  PARAMCD == "BESRSPI" & ARM %in% c("A: Drug X", "B: Placebo"), "adrs"
)
run(fstg01, proc_data,
  subgroups = c("SEX", "AGEGR1", "RACE"),
  conf_level = 0.90, dataset = "adrs"
)

FSTG02 Subgroup Analysis of Survival Duration.

Description

The template produces the subgroup analysis of survival duration graphic.

Usage

fstg02_main(
  adam_db,
  dataset = "adtte",
  arm_var = "ARM",
  subgroups = c("SEX", "AGEGR1", "RACE"),
  strata_var = NULL,
  stat_var = c("n_tot", "n", "median", "hr", "ci"),
  ...
)

fstg02_pre(adam_db, ...)

fstg02

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) the arm variable name used for group splitting.

subgroups

(character) the subgroups variable name to list baseline risk factors.

strata_var

(character) required if stratified analysis is performed.

stat_var

(character) the names of statistics to be reported in tabulate_survival_subgroups.

...

Further arguments passed to g_forest and extract_rsp_subgroups (a wrapper for h_odds_ratio_subgroups_df and h_proportion_subgroups_df). For details, see the documentation in tern. Commonly used arguments include gp, col_symbol_size, col, vline, groups_lists, conf_level, method, label_all, etc.

Format

An object of class chevron_g of length 1.

Details

Value

the main function returns a gTree object.

a gTree object.

the preprocessing function returns a list of data.frame.

Functions

Note

Examples

library(dplyr)
library(dunlin)

proc_data <- log_filter(
  syn_data,
  PARAMCD == "OS" & ARM %in% c("A: Drug X", "B: Placebo"), "adtte"
)
run(fstg02, proc_data,
  subgroups = c("SEX", "AGEGR1", "RACE"),
  conf_level = 0.90, dataset = "adtte"
)

Fuse list elements

Description

Fuse list elements

Usage

fuse_sequentially(x, y)

Arguments

x

(list) to fuse.

y

(list) to fuse. Elements with names already existing in x are discarded.


General Argument Name Convention

Description

General Argument Name Convention

Usage

gen_args(
  adam_db,
  main,
  preprocess,
  postprocess,
  dataset,
  type,
  arm_var,
  lbl_overall,
  prune_0,
  req_tables,
  deco,
  group,
  tlg,
  visitvar,
  visit_value,
  paramcd_value,
  key_cols,
  disp_cols,
  row_split_var,
  split_into_pages_by_var,
  page_var,
  unique_rows,
  ...
)

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

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.

dataset

(string) the name of a table in the adam_db object.

type

(string) indicating the subclass.

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

prune_0

(flag) remove 0 count rows

req_tables

(character) names of the required tables.

deco

(character) decoration with title, subtitles and main_footer content

group

(⁠list of lists⁠) for group-dependent data binning

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

visitvar

(string) typically "AVISIT" or user-defined visit incorporating "ATPT".

visit_value

Value of visit variable.

paramcd_value

Value of PARAMCD variable.

key_cols

(character) names of columns that should be treated as key columns when rendering the listing. Key columns allow you to group repeat occurrences.

disp_cols

(character) names of non-key columns which should be displayed when the listing is rendered.

row_split_var

(character) additional row split variables.

split_into_pages_by_var

(character or NULL) the name of the variable to split the listing by.

page_var

(string) variable name prior to which the row split is by page.

unique_rows

(flag) whether to keep only unique rows in listing.

...

not used.

Details

the following arguments are better provided through the study object: lbl_overall, arm_var.

Value

invisible NULL. This function is for documentation purpose only.


Get grade rule

Description

Get grade rule

Usage

get_grade_rule(direction = "high", missing = "incl")

Arguments

direction

(string) of abnormality direction.

missing

(string) method to deal with missing

Value

a rule object.


Get page by value

Description

Get page by value

Usage

get_page_by(var, vars)

Get Section dividers

Description

Get Section dividers

Usage

get_section_div()

Value

(character) value with section dividers at corresponding section.


Subset Arguments and Merge

Description

Subset Arguments and Merge

Usage

get_subset(x, y)

Get a harmonious value of horizontal justification for x axis

Description

Get a harmonious value of horizontal justification for x axis

Usage

get_x_hjust(x)

Arguments

x

(numeric) angle between -90 and 90 degree.


Get a harmonious value of vertical justification for x axis

Description

Get a harmonious value of vertical justification for x axis

Usage

get_x_vjust(x)

Arguments

x

(numeric) angle between -90 and 90 degree.


List of gg object

Description

[Deprecated]

Usage

gg_list(...)

Arguments

...

(ggplot) objects.

Value

a gg_list object.


Theme for Chevron Plot

Description

Theme for Chevron Plot

Usage

gg_theme_chevron(
  grid_y = TRUE,
  grid_x = FALSE,
  legend_position = "top",
  text_axis_x_rot = 45
)

Arguments

grid_y

(flag) should horizontal grid be displayed.

grid_x

(flag) should vertical grid be displayed.

legend_position

(string) the position of the legend.

text_axis_x_rot

(numeric) the x axis text rotation angle.

Value

a theme object.


List of grob object

Description

[Deprecated]

Usage

grob_list(...)

Arguments

...

(grob) objects.

Value

a grob_list object.


Decimal formatting

Description

Decimal formatting

Usage

h_format_dec(digits, format, ne = NULL)

Arguments

digits

(integer) number of digits.

format

(string) describing how the numbers should be formatted following the sprintf syntax.

ne

(string) that should replace actual value. If NULL, no replacement is performed.

Value

function formatting numbers with the defined format.

Examples

fun <- h_format_dec(c(1, 1), "%s - %s")
fun(c(123, 567.89))

Helper Function Extracting Layout Functions

Description

Helper Function Extracting Layout Functions

Usage

h_unwrap_layout(x, pattern)

Helper function to add a column split if specified

Description

Helper function to add a column split if specified

Usage

ifneeded_split_col(lyt, var, ...)

Arguments

lyt

(rtables) object.

var

(string) the name of the variable initiating a new column split.

...

Additional arguments for split_cols_by.

Value

rtables object.


Helper function to add a row split if specified

Description

Helper function to add a row split if specified

Usage

ifneeded_split_row(lyt, var, lbl_var)

Arguments

lyt

(PreDataTableLayouts) object.

var

(string) the name of the variable initiating a new row split.

lbl_var

(string)the label of the variable var.

Value

PreDataTableLayouts object.


KMG01 Kaplan-Meier Plot 1.

Description

KMG01 Kaplan-Meier Plot 1.

Usage

kmg01_main(
  adam_db,
  dataset = "adtte",
  arm_var = "ARM",
  strata = NULL,
  strat = lifecycle::deprecated(),
  ...
)

kmg01_pre(adam_db, dataset = "adtte", ...)

kmg01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

strata

(character) the variable name of stratification variables.

strat

(character) [Deprecated]; for backwards compatibility only. Use strata instead.

...

Further arguments passed to g_km and control_coxph. For details, see the documentation in tern. Commonly used arguments include col, pval_method, ties, conf_level, conf_type, annot_coxph, annot_stats, etc.

Format

An object of class chevron_g of length 1.

Details

Value

the main function returns a gTree object.

a gTree object.

the preprocessing function returns a list of data.frame.

Functions

Note

Examples

library(dplyr)
library(dunlin)

col <- c(
  "A: Drug X" = "black",
  "B: Placebo" = "blue",
  "C: Combination" = "gray"
)

pre_data <- log_filter(syn_data, PARAMCD == "OS", "adtte")
run(kmg01, pre_data, dataset = "adtte", col = col)

LBT01 Lab Results and Change from Baseline by Visit Table.

Description

The LBT01 table provides an overview of the Lab values and its change from baseline of each respective arm over the course of the trial.

Usage

lbt01_main(
  adam_db,
  dataset = "adlb",
  arm_var = "ACTARM",
  lbl_overall = NULL,
  row_split_var = NULL,
  summaryvars = c("AVAL", "CHG"),
  visitvar = "AVISIT",
  precision = lab_paramcd_precision(),
  page_var = "PARAMCD",
  .stats = c("n", "mean_sd", "median", "range"),
  skip = list(CHG = "BASELINE"),
  ...
)

lbt01_pre(adam_db, dataset = "adlb", ...)

lbt01

lab_paramcd_precision()

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) additional row split variables.

summaryvars

(character) variables to be analyzed. The label attribute of the corresponding column in table of adam_db is used as label.

visitvar

(string) typically one of "AVISIT" or user-defined visit incorporating "ATPT".

precision

(named list of integer) where names are values found in the PARAMCD column and the values indicate the number of digits in statistics. If default is set, and parameter precision not specified, the value for default will be used. If default is not set, the default precision is 2.

page_var

(string) variable name prior to which the row split is by page.

.stats

(character) statistics names, see tern::analyze_vars().

skip

Named (list) of visit values that need to be inhibited.

...

additional arguments like .indent_mods, .labels.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

a named list with the precision of each lab parameter code (default is 2).

Functions

Note

Examples

run(lbt01, syn_data)
# example code
head(lab_paramcd_precision())


lbt04 Layout

Description

lbt04 Layout

Usage

lbt04_lyt(
  arm_var,
  lbl_overall,
  lbl_param,
  lbl_abn_var,
  var_parcat,
  var_param,
  row_split_var,
  row_split_lbl,
  analysis_abn_var,
  variables,
  page_var
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_param

(string) label of the PARAM variable.

lbl_abn_var

(string) label of the analysis_abn_var variable.

row_split_var

(character) additional row split variables.

variables

(list) see tern::count_abnormal

page_var

(string) variable name prior to which the row split is by page.


LBT04 Laboratory Abnormalities Not Present at Baseline Table.

Description

The LBT04 table provides an overview of laboratory abnormalities not present at baseline.

Usage

lbt04_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  analysis_abn_var = "ANRIND",
  baseline_abn_var = "BNRIND",
  row_split_var = "PARCAT1",
  page_var = tail(row_split_var, 1L),
  ...
)

lbt04_pre(adam_db, ...)

lbt04_post(tlg, ...)

lbt04

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

analysis_abn_var

(string) column describing anomaly magnitude

baseline_abn_var

(string) column describing anomaly at baseline.

row_split_var

(character) additional row split variables.

page_var

(string) variable name prior to which the row split is by page.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(lbt04, syn_data)

lbt05 Layout

Description

lbt05 Layout

Usage

lbt05_lyt(arm_var, lbl_overall, lbl_param, lbl_anrind, map)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_param

(string) label of the PARAM variable.

lbl_anrind

(string) label of the ANRIND variable.

map

(data.frame) mapping of PARAMs to directions of abnormality.


LBT05 Table 1 (Default) Laboratory Abnormalities with Single and Replicated Marked.

Description

LBT05 Table 1 (Default) Laboratory Abnormalities with Single and Replicated Marked.

Usage

lbt05_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  map = lab_paramcd_abn_dir(),
  ...
)

lbt05_pre(adam_db, ...)

lbt05_post(tlg, prune_0 = FALSE, keep = "Any Abnormality", ...)

lbt05

lab_paramcd_abn_dir()

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

map

(data.frame) with two columns mapping of parameters code (PARAMCD) to directions of abnormality (ABN_DIR). If a parameter is not in the map or if map is NULL, both directions are analyzed.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

keep

(character) the levels to keep in the table even if they are empty. If NULL, all levels are pruned.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

a data.frame with the direction of abnormality of each lab parameter code.

Functions

Note

Examples

run(lbt05, syn_data)

map <- data.frame(PARAMCD = c("ALT", "ALT", "CRP", "CRP", "IGA", "XXX"), ABN_DIR = c("Low", "High"))
run(lbt05, syn_data, map = map)
# example code
head(lab_paramcd_abn_dir())


lbt06 Layout

Description

lbt06 Layout

Usage

lbt06_lyt(
  arm_var,
  lbl_overall,
  lbl_param,
  lbl_visit,
  lbl_anrind,
  lbl_bnrind,
  visitvar,
  anrind_var,
  bnrind_var,
  page_var
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_param

(string) text label of the PARAM variable.

lbl_visit

(string) text label of the AVISIT variable.

lbl_anrind

(string) text label of the ANRIND variable.

lbl_bnrind

(string) text label of the BNRIND variable.

visitvar

(string) typically "AVISIT" or user-defined visit incorporating "ATPT".

anrind_var

(string) the variable for analysis reference range indicator.

bnrind_var

(string) the variable for baseline reference range indicator.

page_var

(string) variable name prior to which the row split is by page.


LBT06 Table 1 (Default) Laboratory Abnormalities by Visit and Baseline Status Table 1.

Description

The LBT06 table produces the standard laboratory abnormalities by visit and baseline status summary.

Usage

lbt06_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  page_var = "PARAMCD",
  ...
)

lbt06_pre(adam_db, ...)

lbt06_post(tlg, prune_0 = FALSE, ...)

lbt06

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) the arm variable used for arm splitting.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

page_var

(string) variable name prior to which the row split is by page.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(lbt06, syn_data)

lbt07 Layout

Description

lbt07 Layout

Usage

lbt07_lyt(
  arm_var,
  lbl_overall,
  lbl_param_var,
  lbl_grad_dir_var,
  param_var,
  grad_dir_var,
  grad_anl_var,
  map
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_param_var

(string) label of the param_var variable.

lbl_grad_dir_var

(string) label for the grad_dir_var variable.

param_var

(string) the name of the column storing the parameters name.

grad_dir_var

(string) the name of the column storing the grade direction variable which is required in order to obtain the correct denominators when building the layout as it is used to define row splitting.

grad_anl_var

(string) the name of the column storing toxicity grade variable where all negative values from ATOXGR are replaced by their absolute values.

map

(data.frame) mapping of PARAMs to directions of abnormality.


LBT07 Table 1 (Default) Laboratory Test Results and Change from Baseline by Visit.

Description

The LBT07 table provides an overview of the analysis values and its change from baseline of each respective arm over the course of the trial.

Usage

lbt07_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  param_var = "PARAM",
  grad_dir_var = "GRADE_DIR",
  grad_anl_var = "GRADE_ANL",
  ...
)

lbt07_pre(adam_db, ...)

lbt07_post(tlg, prune_0 = TRUE, keep = "Any", ...)

lbt07

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

param_var

(string) the name of the column storing the parameters name.

grad_dir_var

(string) the name of the column storing the grade direction variable which is required in order to obtain the correct denominators when building the layout as it is used to define row splitting.

grad_anl_var

(string) the name of the column storing toxicity grade variable where all negative values from ATOXGR are replaced by their absolute values.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

keep

(character) the levels to keep in the table even if they are empty. If NULL, all levels are pruned.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(lbt07, syn_data)

lbt14 Layout

Description

lbt14 Layout

Usage

lbt14_lyt(arm_var, lbl_overall, lbl_param, lbl_btoxgr, page_var)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

page_var

(string) variable name prior to which the row split is by page.


LBT14 Laboratory Test Results Shift Table – Highest NCI-CTCAE Grade Post-Baseline by Baseline Grade (Low or High Direction).

Description

LBT14 Laboratory Test Results Shift Table – Highest NCI-CTCAE Grade Post-Baseline by Baseline Grade (Low or High Direction).

Usage

lbt14_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  gr_missing = "incl",
  page_var = "PARAMCD",
  ...
)

lbt14_pre(adam_db, gr_missing = "incl", direction = "low", ...)

lbt14_post(tlg, prune_0 = TRUE, ...)

lbt14

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

gr_missing

(string) how missing baseline grades should be handled. Defaults to "incl" to include the "Missing" level. Other options are "excl" to exclude patients with missing baseline grades and "gr_0" to convert missing baseline grades to grade 0.

page_var

(string) variable name prior to which the row split is by page.

...

not used.

direction

(string) one of "high" or "low" indicating which shift direction should be detailed.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(lbt14, syn_data)

LBT15 Laboratory Test Shifts to NCI-CTCAE Grade 3-4 Post-Baseline Table.

Description

LBT15 Laboratory Test Shifts to NCI-CTCAE Grade 3-4 Post-Baseline Table.

Usage

lbt15_pre(adam_db, ...)

lbt15

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

...

not used.

Format

An object of class chevron_t of length 1.

Value

the preprocessing function returns a list of data.frame.

Functions

Source

lbt04.R

Examples

run(lbt15, syn_data)

Format for Chevron Listings

Description

Format for Chevron Listings

Usage

listing_format_chevron()

Value

a list of fmt_config.


Obtain levels from vector

Description

Obtain levels from vector

Usage

lvls(x)

Arguments

x

(character) or (factor) object to obtain levels.

Details

For factors, the levels will be returned. For characters, the sorted unique values will be returned.

Value

character with unique values.


Main

Description

retrieve or set main function.

Usage

main(x)

## S4 method for signature 'chevron_tlg'
main(x)

main(x) <- value

## S4 replacement method for signature 'chevron_tlg'
main(x) <- value

Arguments

x

(chevron_tlg) input.

value

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

Value

the function stored in the main slot of the x argument.


MHT01 Medical History Table.

Description

The MHT01 table provides an overview of the subjects medical history by SOC and Preferred Term.

Usage

mht01_label

mht01_main(
  adam_db,
  arm_var = "ARM",
  row_split_var = "MHBODSYS",
  lbl_overall = NULL,
  summary_labels = list(all = mht01_label),
  ...
)

mht01_pre(adam_db, ...)

mht01_post(tlg, row_split_var = "MHBODSYS", prune_0 = TRUE, ...)

mht01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

row_split_var

(character) additional row split variables.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

summary_labels

(list) of summarize labels. See details.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class character of length 2.

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(mht01, syn_data)

Missing rule

Description

Missing rule

Usage

missing_rule

Format

An object of class rule (inherits from character) of length 2.


MLA Grade Direction Data

Description

MLA Grade Direction Data

Usage

mla_dir

Format

An object of class data.frame with 76 rows and 2 columns.


MNG01 Mean Plot Graph.

Description

Overview of a summary statistics across time and arm for a selected data set.

Usage

mng01_main(
  adam_db,
  dataset = "adlb",
  x_var = "AVISIT",
  y_var = "AVAL",
  y_name = "PARAM",
  y_unit = NULL,
  arm_var = "ACTARM",
  center_fun = "mean",
  interval_fun = "mean_ci",
  jitter = 0.3,
  line_col = nestcolor::color_palette(),
  line_type = NULL,
  ggtheme = gg_theme_chevron(),
  table = c("n", center_fun, interval_fun),
  ...
)

mng01_pre(adam_db, dataset, x_var = "AVISIT", ...)

mng01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

x_var

(string) the name of a column in the dataset to represent on the x-axis.

y_var

(string) the name of the variable to be represented on the y-axis.

y_name

(string) the variable name for y. Used for plot's subtitle.

y_unit

(string) the name of the variable with the units of y. Used for plot's subtitle. if NULL, only y_name is displayed as subtitle.

arm_var

(string) variable used for column splitting

center_fun

(string) the function to compute the estimate value.

interval_fun

(string) the function defining the crossbar range. If NULL, no crossbar is displayed.

jitter

(numeric) the width of spread for data points on the x-axis; a number from 0 (no jitter) to 1 (high jitter), with a default of 0.3 (slight jitter).

line_col

(character) describing the colors to use for the lines or a named character associating values of arm_var with color names.

line_type

(character) describing the line type to use for the lines or a named character associating values of arm_var with line types.

ggtheme

(theme) passed to tern::g_lineplot().

table

(character) names of the statistics to be displayed in the table. If NULL, no table is displayed.

...

passed to tern::g_lineplot().

Format

An object of class chevron_g of length 1.

Details

Value

the main function returns a list of ggplot objects.

a list of ggplot objects.

the preprocessing function returns a list of data.frame.

Functions

Note

See Also

gg_theme_chevron(), tern::g_lineplot().

Examples

col <- c(
  "A: Drug X" = "black",
  "B: Placebo" = "blue",
  "C: Combination" = "gray"
)

lt <- c(
  "A: Drug X" = "29",
  "B: Placebo" = "99",
  "C: Combination" = "solid"
)

run(
  mng01,
  syn_data,
  dataset = "adlb",
  x_var = c("AVISIT", "AVISITN"),
  line_col = col,
  line_type = lt
)

Modify character

Description

Modify character

Usage

modify_character(x, y)

No Coding Available rule

Description

No Coding Available rule

Usage

nocoding

Format

An object of class rule (inherits from character) of length 2.


Obtain value from a vector

Description

Obtain value from a vector

Usage

obtain_value(obj, index)

Occurrence Layout

Description

Occurrence Layout

Usage

occurrence_lyt(
  arm_var,
  lbl_overall,
  row_split_var,
  lbl_row_split,
  medname_var,
  lbl_medname_var,
  summary_labels,
  count_by
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) additional row split variables.

medname_var

(string) variable name of medical treatment name.

lbl_medname_var

(string) label for the variable defining the medication name.

summary_labels

(list) of summarize labels. See details.


Outcome Rule

Description

Outcome Rule

Usage

outcome_rule

Format

An object of class rule (inherits from character) of length 6.


pdt01 Layout

Description

pdt01 Layout

Usage

pdt01_lyt(
  arm_var,
  lbl_overall,
  dvcode_var,
  lbl_dvcode_var,
  dvterm_var,
  lbl_dvterm_var
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

dvcode_var

(string) the variable defining the protocol deviation coded term. By default DVDECOD.

lbl_dvcode_var

(string) label for the variable defining the protocol deviation coded term.

dvterm_var

(string) the variable defining the protocol deviation term. By default DVTERM.

lbl_dvterm_var

(string) label for the variable defining the protocol deviation term.


pdt01 Major Protocol Deviations Table.

Description

A major protocol deviations table with the number of subjects and the total number of treatments by medication class sorted alphabetically and medication name sorted by frequencies.

Usage

pdt01_main(
  adam_db,
  arm_var = "ARM",
  lbl_overall = NULL,
  dvcode_var = "DVDECOD",
  dvterm_var = "DVTERM",
  ...
)

pdt01_pre(adam_db, ...)

pdt01_post(
  tlg,
  prune_0 = TRUE,
  dvcode_var = "DVDECOD",
  dvterm_var = "DVTERM",
  ...
)

pdt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

dvcode_var

(string) the variable defining the protocol deviation coded term. By default DVDECOD.

dvterm_var

(string) the variable defining the protocol deviation term. By default DVTERM.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(pdt01, syn_data)

pdt02 Layout

Description

pdt02 Layout

Usage

pdt02_lyt(
  arm_var,
  lbl_overall,
  lbl_dvreas_var,
  lbl_dvterm_var,
  dvreas_var,
  dvterm_var
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

lbl_dvreas_var

(string) label for the variable defining the reason for deviation.

lbl_dvterm_var

(string) label for the variable defining the protocol deviation term.

dvreas_var

(string) the variable defining the reason for deviation. By default DVREAS.

dvterm_var

(string) the variable defining the protocol deviation term. By default DVTERM.


pdt02 Major Protocol Deviations Related to Epidemic/Pandemic Table.

Description

A major protocol deviations table with the number of subjects and the total number of Major Protocol Deviations Related to Epidemic/Pandemic sorted alphabetically and deviations name sorted by frequencies.

Usage

pdt02_main(
  adam_db,
  arm_var = "ARM",
  lbl_overall = NULL,
  dvreas_var = "DVREAS",
  dvterm_var = "DVTERM",
  ...
)

pdt02_pre(adam_db, ...)

pdt02_post(
  tlg,
  prune_0 = TRUE,
  dvreas_var = "DVREAS",
  dvterm_var = "DVTERM",
  ...
)

pdt02

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

dvreas_var

(string) the variable defining the reason for deviation. By default DVREAS.

dvterm_var

(string) the variable defining the protocol deviation term. By default DVTERM.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(pdt02, syn_data)

Post process

Description

retrieve or set postprocess function.

Usage

postprocess(x)

## S4 method for signature 'chevron_tlg'
postprocess(x)

postprocess(x) <- value

## S4 replacement method for signature 'chevron_tlg'
postprocess(x) <- value

Arguments

x

(chevron_tlg) input.

value

(function) returning a post-processed tlg.

Value

the function stored in the postprocess slot of the x argument.


Pre process

Description

retrieve or set preprocess function.

Usage

preprocess(x)

## S4 method for signature 'chevron_tlg'
preprocess(x)

preprocess(x) <- value

## S4 replacement method for signature 'chevron_tlg'
preprocess(x) <- value

Arguments

x

(chevron_tlg) input.

value

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

Value

the function stored in the preprocess slot of the x argument.


Description

Print Arguments

Usage

print_args(run_call, additional_args, args, auto_pre = TRUE)

Description

Print list

Usage

print_list(x, indent = 2L)

Proportion layout

Description

Proportion layout

Usage

proportion_lyt(
  lyt,
  arm_var,
  methods,
  strata,
  conf_level,
  odds_ratio = TRUE,
  rsp_var = "IS_RSP"
)

Arguments

lyt

layout created by rtables

arm_var

(string) variable used for column splitting

methods

(list) a named list, use a named list to control, for example: methods = list(prop_conf_method = "wald", diff_conf_method = "wald", strat_diff_conf_method = "ha", diff_pval_method = "fisher", strat_diff_pval_method = "schouten") prop_conf_method controls the methods of calculating proportion confidence interval, diff_conf_method controls the methods of calculating unstratified difference confidence interval, strat_diff_conf_method controls the methods of calculating stratified difference confidence interval, diff_pval_method controls the methods of calculating unstratified p-value for odds ratio, strat_diff_pval_method controls the methods of calculating stratified p-value for odds ratio, see more details in tern

strata

(string) stratification factors, e.g. strata = c("STRATA1", "STRATA2"), by default as NULL

conf_level

(numeric) the level of confidence interval, default is 0.95.

odds_ratio

(flag) should the odds ratio be calculated, default is TRUE


Prune table except specified levels

Description

Prune table except specified levels

Usage

prune_except(keep)

Arguments

keep

(character) levels to keep.

Value

A pruning function.


Objects exported from other packages

Description

These objects are imported from other packages. Follow the links below to see their documentation.

dunlin

get_arg, reformat

formatters

with_label


Creates NULL Report

Description

Creates NULL Report

Usage

report_null(tlg, ...)

## S4 method for signature 'NULL'
report_null(tlg, ind = 2L, ...)

## S4 method for signature 'VTableTree'
report_null(tlg, ind = 2L, ...)

## S4 method for signature 'listing_df'
report_null(tlg, ind = 2L, ...)

## S4 method for signature 'list'
report_null(tlg, ind = 2L, ...)

## S4 method for signature 'ANY'
report_null(tlg, ...)

standard_null_report()

Arguments

tlg

to convert to null report.

...

not used.

ind

(integer) indentation for the outputs of class VTableTree.

Value

the tlg object or a NULL report if the tlg is NULL, is a TableTree with 0 rows, is a listing_df with 0 rows or is a list with 0 elements.

Examples

report_null(NULL)

rmpt01 Layout

Description

rmpt01 Layout

Usage

rmpt01_lyt(
  summaryvars,
  lbl_summaryvars,
  show_tot,
  row_split_var,
  col_split_var,
  overall_col_lbl
)

Arguments

summaryvars

(string) variables to be analyzed. The label attribute of the corresponding columns in adex table of adam_db is used as label.

lbl_summaryvars

(character) label associated with the analyzed variables.

show_tot

(flag) whether to display the cumulative total.

row_split_var

(character) additional row split variables.

col_split_var

(string) additional column splitting variable.

overall_col_lbl

(string) name of the overall column. If NULL, no overall level is added.


RMPT01Duration of Exposure for Risk Management Plan Table.

Description

The RMPT01 table provides an overview of duration of exposure.

Usage

rmpt01_main(
  adam_db,
  summaryvars = "AVALCAT1",
  show_tot = TRUE,
  row_split_var = NULL,
  col_split_var = NULL,
  overall_col_lbl = NULL,
  ...
)

rmpt01_pre(adam_db, summaryvars = "AVALCAT1", ...)

rmpt01_post(tlg, prune_0 = FALSE, ...)

rmpt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

summaryvars

(string) variables to be analyzed. The label attribute of the corresponding columns in adex table of adam_db is used as label.

show_tot

(flag) whether to display the cumulative total.

row_split_var

(string) the name of the column that containing variable to split exposure by.

col_split_var

(string) additional column splitting variable.

overall_col_lbl

(string) name of the overall column. If NULL, no overall level is added.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(rmpt01, syn_data, col_split_var = "SEX")

rmpt03Duration of Exposure for Risk Management Plan Table.

Description

The rmpt03 table provides an overview of duration of exposure.

Usage

rmpt03_main(
  adam_db,
  summaryvars = "AGEGR1",
  show_tot = TRUE,
  row_split_var = NULL,
  col_split_var = "SEX",
  overall_col_lbl = "All Genders",
  ...
)

rmpt03_pre(adam_db, summaryvars = "AGEGR1", ...)

rmpt03

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

summaryvars

(string) variables to be analyzed. The label attribute of the corresponding columns in adex table of adam_db is used as label.

show_tot

(flag) whether to display the cumulative total.

row_split_var

(string) the name of the column that containing variable to split exposure by.

col_split_var

(string) additional column splitting variable.

overall_col_lbl

(string) name of the overall column. If NULL, no overall level is added.

...

not used.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

Functions

Examples

pre_data <- dunlin::propagate(syn_data, "adsl", "AGEGR1", "USUBJID")
run(rmpt03, pre_data)

RMPT04Extent of Exposure by Ethnic Origin for Risk Management Plan Table.

Description

The RMPT04 table provides an overview of duration of exposure extent.

Usage

rmpt04_main(
  adam_db,
  summaryvars = "ETHNIC",
  show_tot = TRUE,
  row_split_var = NULL,
  col_split_var = NULL,
  overall_col_lbl = NULL,
  ...
)

rmpt04_pre(adam_db, summaryvars = "ETHNIC", ...)

rmpt04

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

summaryvars

(string) variables to be analyzed. The label attribute of the corresponding columns in adex table of adam_db is used as label.

show_tot

(flag) whether to display the cumulative total.

row_split_var

(character) additional row split variables.

col_split_var

(string) additional column splitting variable.

overall_col_lbl

(string) name of the overall column. If NULL, no overall level is added.

...

not used.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

Functions

Examples

run(rmpt04, syn_data)

RMPT05 Extent of Exposure by Race for Risk Management Plan Table.

Description

The RMPT05 table provides an overview of duration of exposure extent.

Usage

rmpt05_main(
  adam_db,
  summaryvars = "RACE",
  show_tot = TRUE,
  row_split_var = NULL,
  col_split_var = NULL,
  overall_col_lbl = NULL,
  ...
)

rmpt05_pre(adam_db, summaryvars = "RACE", ...)

rmpt05

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

summaryvars

(string) variables to be analyzed. The label attribute of the corresponding columns in adex table of adam_db is used as label.

show_tot

(flag) whether to display the cumulative total.

row_split_var

(character) additional row split variables.

col_split_var

(string) additional column splitting variable.

overall_col_lbl

(string) name of the overall column. If NULL, no overall level is added.

...

not used.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

Functions

Examples

run(rmpt05, syn_data)

rmpt06 Layout

Description

rmpt06 Layout

Usage

rmpt06_lyt(
  arm_var,
  lbl_overall,
  method,
  conf_level,
  show_diff,
  ref_group,
  method_diff,
  conf_level_diff,
  grade_groups
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted


RMPT06 Table 1 (Default) Seriousness, Outcomes, Severity, Frequency with 95% CI for Risk Management Plan.

Description

RMPT06 Table 1 (Default) Seriousness, Outcomes, Severity, Frequency with 95% CI for Risk Management Plan.

Usage

rmpt06_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  method = "clopper-pearson",
  conf_level = 0.95,
  show_diff = FALSE,
  ref_group = NULL,
  method_diff = "wald",
  conf_level_diff = 0.95,
  grade_groups = NULL,
  ...
)

rmpt06_pre(adam_db, ...)

rmpt06_post(tlg, prune_0 = FALSE, ...)

rmpt06

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

method

(string) the method used to construct the confidence interval. See tern::estimate_proportion.

conf_level

(proportion) the confidence level of the interval. See tern::estimate_proportion.

show_diff

(flag) whether to show the difference of patient with at least one adverse event between groups.

ref_group

(string) the reference group for the difference.

method_diff

(string) the method used to construct the confidence interval for the difference between groups.

conf_level_diff

(proportion) the confidence level of the interval for the difference between groups.

grade_groups

(list) the grade groups to be displayed.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Examples

run(rmpt06, syn_data)

rspt01 Layout

Description

rspt01 Layout

Usage

rspt01_lyt(
  arm_var,
  rsp_var,
  ref_group,
  odds_ratio,
  perform_analysis,
  strata,
  conf_level,
  methods
)

Arguments

arm_var

(string) variable used for column splitting


RSPT01 Binary Outcomes Summary.

Description

RSPT01 template may be used to summarize any binary outcome or response variable at a single time point. Typical application for oncology

Usage

rspt01_main(
  adam_db,
  dataset = "adrs",
  arm_var = "ARM",
  ref_group = NULL,
  odds_ratio = TRUE,
  perform_analysis = "unstrat",
  strata = NULL,
  conf_level = 0.95,
  methods = list(),
  ...
)

rspt01_pre(adam_db, ...)

rspt01_post(tlg, prune_0 = TRUE, ...)

rspt01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

ref_group

(string) The name of the reference group, the value should be identical to the values in arm_var, if not specified, it will by default use the first level or value of arm_var.

odds_ratio

(flag) should the odds ratio be calculated, default is TRUE

perform_analysis

(string) option to display statistical comparisons using stratified analyses, or unstratified analyses, or both, e.g. c("unstrat", "strat"). Only unstratified will be displayed by default

strata

(string) stratification factors, e.g. strata = c("STRATA1", "STRATA2"), by default as NULL

conf_level

(numeric) the level of confidence interval, default is 0.95.

methods

(list) a named list, use a named list to control, for example: methods = list(prop_conf_method = "wald", diff_conf_method = "wald", strat_diff_conf_method = "ha", diff_pval_method = "fisher", strat_diff_pval_method = "schouten") prop_conf_method controls the methods of calculating proportion confidence interval, diff_conf_method controls the methods of calculating unstratified difference confidence interval, strat_diff_conf_method controls the methods of calculating stratified difference confidence interval, diff_pval_method controls the methods of calculating unstratified p-value for odds ratio, strat_diff_pval_method controls the methods of calculating stratified p-value for odds ratio, see more details in tern

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Examples

library(dplyr)
library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "BESRSPI", "adrs")

run(rspt01, proc_data)

run(rspt01, proc_data,
  odds_ratio = FALSE, perform_analysis = c("unstrat", "strat"),
  strata = c("STRATA1", "STRATA2"), methods = list(diff_pval_method = "fisher")
)

Run the TLG-generating pipeline

Description

Run the TLG-generating pipeline

Usage

run(
  object,
  adam_db,
  auto_pre = TRUE,
  verbose = FALSE,
  unwrap = FALSE,
  ...,
  user_args = list(...)
)

## S4 method for signature 'chevron_tlg'
run(
  object,
  adam_db,
  auto_pre = TRUE,
  verbose = get_arg("chevron.run.verbose", "R_CHEVRON_RUN_VERBOSE", FALSE),
  unwrap = get_arg("chevron.run.unwrap", "R_CHEVRON_RUN_UNWRAP", verbose),
  ...,
  user_args = list(...)
)

Arguments

object

(chevron_tlg) input.

adam_db

(list of data.frames) object containing the ADaM datasets

auto_pre

(flag) whether to perform the default pre processing step.

verbose

(flag) whether to print argument information.

unwrap

(flag) whether to print the preprocessing postprocessing and main function together with the associated layout function.

...

extra arguments to pass to the pre-processing, main and post-processing functions.

user_args

(list) arguments from ....

Details

The functions stored in the preprocess, main and postprocess slots of the chevron_tlg objects are called respectively, preprocessing, main and postprocessing functions.

When executing the run method on a chevron_tlg object, if auto_pre is TRUE, the adam_bd list is first passed to the preprocessing function. The resulting list is then passed to the main function which produces a table, graph or listings or a list of these objects. This output is then passed to the postprocessing function which performed the final modifications before returning the output. Additional arguments specified in ... or user_args are passed to each of the three functions.

Value

an rtables (for chevron_t), rlistings (for chevron_l), grob (for chevron_g) or ElementaryTable (null report) depending on the class of chevron_tlg object passed as object argument.

Examples

run(mng01, syn_data, auto_pre = TRUE, dataset = "adlb")

Summary factor allowing NA

Description

Summary factor allowing NA

Usage

s_summary_na(
  x,
  labelstr,
  denom = c("n", "N_row", "N_col"),
  .N_row,
  .N_col,
  ...
)

Arguments

x

(factor) input.

denom

(string) denominator choice.

.N_row

(integer) number of rows in row-split dataset.

.N_col

(integer) number of rows in column-split dataset.

...

Not used


Create Script for TLG Generation

Description

Create Script for TLG Generation

Usage

script_funs(x, adam_db, args, name = deparse(substitute(x)))

## S4 method for signature 'chevron_tlg'
script_funs(x, adam_db, args, name = deparse(substitute(x)))

## S4 method for signature 'chevron_simple'
script_funs(x, adam_db, args, name = deparse(substitute(x)))

Arguments

x

(chevron_tlg) input.

adam_db

(string) the name of the dataset.

args

(string) the name of argument list.

name

(string) name of the template.

Value

character that can be integrated into an executable script.

Examples

script_funs(aet04, adam_db = "syn_data", args = "args")

Set Section Dividers

Description

Set Section Dividers

Usage

set_section_div(x)

Arguments

x

(integerish) value of at which the section divider should be added.

Details

Section dividers are empty lines between sections in tables. E.g. if 1 is used then for the first row split an empty line is added. Currently it only works for aet02, cmt01a and mht01 template.

Value

invisible NULL. Set the chevron.section_div option.


Prune table up to an ElementaryTable

Description

Avoid returning NULL when the table is empty.

Usage

smart_prune(tlg)

Arguments

tlg

(TableTree) object.

Value

pruned TableTree.


Count or summarize by groups

Description

Count or summarize by groups

Usage

split_rows_by_recursive(lyt, row_split_var, ...)

Arguments

lyt

(PreDataTableLayouts) rtable layout.

row_split_var

(character) variable to split rows by.

...

Further arguments for split_rows_by


Standard Main Listing Function

Description

Standard Main Listing Function

Usage

std_listing(
  adam_db,
  dataset,
  key_cols,
  disp_cols,
  split_into_pages_by_var,
  unique_rows = FALSE,
  ...
)

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

key_cols

(character) names of columns that should be treated as key columns when rendering the listing. Key columns allow you to group repeat occurrences.

disp_cols

(character) names of non-key columns which should be displayed when the listing is rendered.

split_into_pages_by_var

(character or NULL) the name of the variable to split the listing by.

unique_rows

(flag) whether to keep only unique rows in listing.

...

additional arguments passed to rlistings::as_listing.

Value

the main function returns an rlistings or a list object.


Standard Post Processing

Description

Standard Post Processing

Usage

std_postprocessing(tlg, ...)

Arguments

tlg

to post process.

...

additional arguments passed to report_null.

Value

a processed tlg or a null report.

Examples

library(rtables)
std_postprocessing(build_table(basic_table() |> analyze("Species"), iris), ind = 10L)


Summarize variables allow NA

Description

Summarize variables allow NA

Usage

summarize_vars_allow_na(
  lyt,
  vars,
  var_labels = vars,
  nested = TRUE,
  ...,
  show_labels = "default",
  table_names = vars,
  section_div = NA_character_,
  .stats = c("n", "count_fraction"),
  .formats = list(count_fraction = format_count_fraction_fixed_dp),
  .labels = NULL,
  .indent_mods = NULL,
  inclNAs = TRUE
)

Example adam Synthetic Data

Description

Example adam Synthetic Data

Usage

syn_data

Format

A named list of 13 data.frames: - adsl - adae - adsaftte - adcm - addv - adeg - adex - adlb - admh - adrs - adsub - adtte - advs

Source

based on package random.cdisc.data


ttet01 Layout

Description

ttet01 Layout

Usage

ttet01_lyt(
  arm_var,
  ref_group,
  summarize_event,
  perform_analysis,
  strata,
  timeunit,
  event_lvls,
  control_survt,
  control_cox_ph,
  control_survtp,
  ...
)

Arguments

arm_var

(string) variable used for column splitting

timeunit

(string) time unit get from AVALU, by default is "Months"

...

not used.


TTET01 Binary Outcomes Summary.

Description

TTET01 template may be used to summarize any binary outcome or response variable at a single time point. Typical application for oncology

Usage

ttet01_main(
  adam_db,
  dataset = "adtte",
  arm_var = "ARM",
  ref_group = NULL,
  summarize_event = TRUE,
  perform_analysis = "unstrat",
  strata = NULL,
  ...
)

ttet01_pre(adam_db, dataset = "adtte", ...)

ttet01_post(tlg, prune_0 = TRUE, ...)

ttet01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

ref_group

(string) The name of the reference group, the value should be identical to the values in arm_var, if not specified, it will by default use the first level or value of arm_var.

summarize_event

(flag) should the event description be displayed, default is TRUE

perform_analysis

(string) option to display statistical comparisons using stratified analyses, or unstratified analyses, or both, e.g. c("unstrat", "strat"). Only unstratified will be displayed by default

strata

(string) stratification factors, e.g. strata = c("STRATA1", "STRATA2"), by default as NULL

...

Further arguments passed to control_surv_time(), control_coxph(), control_survtp(), and surv_timepoint(). For details, see the documentation in tern. Commonly used arguments include pval_method, conf_level, conf_type, quantiles, ties, time_point, method, etc.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Examples

library(dplyr)
library(dunlin)

proc_data <- log_filter(syn_data, PARAMCD == "PFS", "adtte")
run(ttet01, proc_data)

run(ttet01, proc_data,
  summarize_event = FALSE, perform_analysis = c("unstrat", "strat"),
  strata = c("STRATA1", "STRATA2"),
  conf_type = "log-log",
  time_point = c(6, 12),
  method = "both"
)

Extracting Layout Function.

Description

Extracting Layout Function.

Usage

unwrap_layout(x, pattern = "_lyt$")

Arguments

x

(function) containing a call to a layout function.

pattern

(string) identifying layout functions

Value

invisible NULL and print the content of the layout functions found in the body of x.

Examples

unwrap_layout(aet01_main)


Retrieve labels for certain variables

Description

Retrieve labels for certain variables

Usage

var_labels_for(df, vars)

Arguments

df

(data.frame) containing columns with label attribute.

vars

(character) variable names in df.

Details

The labels will be returned if the column has label attribute, otherwise the column name will be returned. Any values between brackets will be replaced with dunlin::render_safe.

Value

a character with replaced placeholders and a label attribute.


VST01 Vital Sign Results and change from Baseline By Visit Table.

Description

The VST01 table provides an overview of the Vital Sign values and its change from baseline of each respective arm over the course of the trial.

Usage

vst01_main(
  adam_db,
  dataset = "advs",
  arm_var = "ACTARM",
  lbl_overall = NULL,
  row_split_var = NULL,
  summaryvars = c("AVAL", "CHG"),
  visitvar = "AVISIT",
  precision = list(DIABP = 0, PUL = 0, SYSBP = 0, default = 2L),
  page_var = "PARAMCD",
  .stats = c("n", "mean_sd", "median", "range"),
  skip = list(CHG = "BASELINE"),
  ...
)

vst01_pre(adam_db, dataset = "advs", ...)

vst01

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

dataset

(string) the name of a table in the adam_db object.

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

row_split_var

(character) additional row split variables.

summaryvars

(character) variables to be analyzed. The label attribute of the corresponding column in table of adam_db is used as label.

visitvar

(string) typically one of "AVISIT" or user-defined visit incorporating "ATPT".

precision

(named list of integer) where names are values found in the PARAMCD column and the values indicate the number of digits in statistics. If default is set, and parameter precision not specified, the value for default will be used. If default is not set, the default precision is 2.

page_var

(string) variable name prior to which the row split is by page.

.stats

(character) statistics names, see tern::analyze_vars().

skip

Named (list) of visit values that need to be inhibited.

...

additional arguments like .indent_mods, .labels.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

Functions

Note

Examples

library(dunlin)

proc_data <- log_filter(
  syn_data,
  PARAMCD %in% c("DIABP", "SYSBP"), "advs"
)
run(vst01, proc_data)

VST02 Vital Sign Abnormalities Table.

Description

Vital Sign Parameters outside Normal Limits Regardless of Abnormality at Baseline.

Usage

vst02_1_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  exclude_base_abn = FALSE,
  ...
)

vst02_pre(adam_db, ...)

vst02_post(tlg, prune_0 = FALSE, ...)

vst02_1

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

exclude_base_abn

(flag) whether baseline abnormality should be excluded.

...

not used.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(vst02_1, syn_data)

VST02 Vital Sign Abnormalities Table.

Description

Vital Sign Parameters outside Normal Limits Among Patients without Abnormality at Baseline.

Usage

vst02_2_main(
  adam_db,
  arm_var = "ACTARM",
  lbl_overall = NULL,
  exclude_base_abn = TRUE,
  ...
)

vst02_2

Arguments

adam_db

(list of data.frames) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

exclude_base_abn

(flag) whether baseline abnormality should be excluded.

...

not used.

Format

An object of class chevron_t of length 1.

Details

Value

the main function returns an rtables object.

the preprocessing function returns a list of data.frame.

the postprocessing function returns an rtables object or an ElementaryTable (null report).

Functions

Note

Examples

run(vst02_2, syn_data)

vst02_1 Layout

Description

vst02_1 Layout

Usage

vst02_lyt(
  arm_var,
  lbl_overall,
  exclude_base_abn,
  lbl_vs_assessment,
  lbl_vs_abnormality
)

Arguments

arm_var

(string) variable used for column splitting

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

exclude_base_abn

(flag) whether to exclude subjects with baseline abnormality from numerator and denominator.

lbl_vs_assessment

(string) the label of the assessment variable.

lbl_vs_abnormality

(string) the label of the abnormality variable.


Yes/No rule in title case

Description

Yes/No rule in title case

Usage

yes_no_rule

Format

An object of class rule (inherits from character) of length 8.