Title: | ADaM Metadata Structure |
---|---|
Description: | A metadata structure for clinical data analysis and reporting based on Analysis Data Model (ADaM) datasets. The package simplifies clinical analysis and reporting tool development by defining standardized inputs, outputs, and workflow. The package can be used to create analysis and reporting planning grid, mock table, and validated analysis and reporting results based on consistent inputs. |
Authors: | Yilong Zhang [aut], Yujie Zhao [aut, cre], Nan Xiao [aut], Benjamin Wang [ctb], Brian Lang [ctb], Howard Baek [ctb], Ruchitbhai Patel [ctb], Madhusudhan Ginnaram [ctb], Sarad Nepal [ctb], Venkatesh Burla [ctb], Merck Sharp & Dohme Corp [cph] |
Maintainer: | Yujie Zhao <[email protected]> |
License: | GPL-3 |
Version: | 0.1.4 |
Built: | 2024-11-20 05:21:08 UTC |
Source: | https://github.com/merck/metalite |
ADaM mappings describe how variables and meta information in the ADaM data are mapped to standardized term.
adam_mapping( name, id = NULL, group = NULL, var = NULL, subset = NULL, label = NULL, ... )
adam_mapping( name, id = NULL, group = NULL, var = NULL, subset = NULL, label = NULL, ... )
name |
A character value of term name. The term name is used as key to link information. |
id |
A character value of subject identifier variable name in an ADaM dataset. |
group |
A character vector of group variable names in an ADaM dataset. |
var |
A character vector of useful variable names in an ADaM dataset. |
subset |
An expression to identify analysis records.
See |
label |
A character value of analysis label. |
... |
Additional variables. |
The design is inspired by ggplot2::aes()
.
A list with class adam_mapping
.
Components of the list are either quosures or constants.
adam_mapping( name = "apat", id = "USUBJID", group = "TRT01A", subset = TRTFL == "Y", label = "All Participants as Treated" )
adam_mapping( name = "apat", id = "USUBJID", group = "TRT01A", subset = TRTFL == "Y", label = "All Participants as Treated" )
Add additional analysis plan
add_plan(plan, analysis, population, observation, parameter, ...)
add_plan(plan, analysis, population, observation, parameter, ...)
plan |
A |
analysis |
A character value of analysis term name. The term name is used as key to link information. |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
... |
Additional arguments. |
A data frame containing analysis plans with new plans added.
plan("ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel" ) |> add_plan("ae_specific", population = "apat", observation = c("wk12", "wk24"), parameter = c("any", "rel") )
plan("ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel" ) |> add_plan("ae_specific", population = "apat", observation = c("wk12", "wk24"), parameter = c("any", "rel") )
A function to assign labels to a data frame
assign_label(data, var = names(data), label = names(data))
assign_label(data, var = names(data), label = names(data))
data |
A data frame. |
var |
The variables to assign labels. |
label |
The labels to be assigned. |
Case 1:
If the variable's label is already define in the original data frame
but not redefined in assign_label(...)
, its original labels will be kept.
Case 2:
If the variable's label is already define in the original data frame
but re-defined by assign_label(...)
, its labels will be re-defined.
Case 3:
If the variable's label is not define in the original data frame
but it is defined by assign_label(...)
, its labels will added.
Case 4:
If the variable's label is not define in the original data frame,
neither was it defined by assign_label(...)
, its labels will be the
variable name itself.
A data frame with labels updated.
assign_label(r2rtf::r2rtf_adae) |> head() assign_label( r2rtf::r2rtf_adae, var = "USUBJID", label = "Unique subject identifier" ) |> head()
assign_label(r2rtf::r2rtf_adae) |> head() assign_label( r2rtf::r2rtf_adae, var = "USUBJID", label = "Unique subject identifier" ) |> head()
adam_mapping
from meta_adam
by name
Collect adam_mapping
from meta_adam
by name
collect_adam_mapping(meta, name)
collect_adam_mapping(meta, name)
meta |
A |
name |
A keyword value. |
An adam_mapping
class object containing the definition of
the search variable in name
.
meta <- meta_example() collect_adam_mapping(meta, "apat")
meta <- meta_example() collect_adam_mapping(meta, "apat")
Collect specification for dataset name
collect_dataname(meta)
collect_dataname(meta)
meta |
A |
A vector of character strings containing the name of the population/observation.
meta <- meta_example() collect_dataname(meta)
meta <- meta_example() collect_dataname(meta)
Collect number of subjects and its subset condition
collect_n_subject( meta, population, parameter, listing = FALSE, histogram = FALSE, var_listing = NULL, remove_blank_group = FALSE, type = "Subjects", use_na = c("ifany", "no", "always"), display_total = TRUE )
collect_n_subject( meta, population, parameter, listing = FALSE, histogram = FALSE, var_listing = NULL, remove_blank_group = FALSE, type = "Subjects", use_na = c("ifany", "no", "always"), display_total = TRUE )
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
listing |
A logical value to display drill down listing per row. |
histogram |
A logical value to display histogram by group. |
var_listing |
A character vector of additional variables included in the listing. |
remove_blank_group |
A logical value to remove a group with all missing value of a parameter. |
type |
A character value to control title name, e.g., Subjects or Records. |
use_na |
A character value for whether to include |
display_total |
A logical value to display total column. |
A list containing number of subjects and its subset condition.
suppressWarnings( meta <- meta_example() |> define_parameter(name = "sex", var = "SEX", label = "Sex") ) collect_n_subject(meta, "apat", "sex")
suppressWarnings( meta <- meta_example() |> define_parameter(name = "sex", var = "SEX", label = "Sex") ) collect_n_subject(meta, "apat", "sex")
Collect observation record index from observation dataset
collect_observation_index(meta, population, observation, parameter)
collect_observation_index(meta, population, observation, parameter)
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
A vector of patient index within the observation group.
meta <- meta_example() collect_observation_index(meta, "apat", "wk12", "ser")
meta <- meta_example() collect_observation_index(meta, "apat", "wk12", "ser")
The key variables used in id
, group
, and subset
are displayed by default.
collect_observation_record( meta, population, observation, parameter, var = NULL )
collect_observation_record( meta, population, observation, parameter, var = NULL )
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
var |
A character vector of additional variables to be displayed in the output. |
A data frame of the observation dataset.
meta <- meta_example() collect_observation_record(meta, "apat", "wk12", "ser") collect_observation_record(meta, "apat", "wk12", "ser", var = "AEDECOD")
meta <- meta_example() collect_observation_record(meta, "apat", "wk12", "ser") collect_observation_record(meta, "apat", "wk12", "ser", var = "AEDECOD")
Collect specification for population definition
collect_population(meta, population, observation = NULL, parameter = NULL)
collect_population(meta, population, observation = NULL, parameter = NULL)
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
A list covering the filter of population, observation (if given) and parameter (if given).
meta <- meta_example() collect_population(meta, "apat") collect_population(meta, "apat", "wk12") collect_population(meta, "apat", "wk12", "ser")
meta <- meta_example() collect_population(meta, "apat") collect_population(meta, "apat", "wk12") collect_population(meta, "apat", "wk12", "ser")
Collect subject identifier information from population dataset
collect_population_id(meta, population)
collect_population_id(meta, population)
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
A vector of patient ID within the population group.
meta <- meta_example() head(collect_population_id(meta, "apat"))
meta <- meta_example() head(collect_population_id(meta, "apat"))
Collect population record index from population dataset
collect_population_index(meta, population)
collect_population_index(meta, population)
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
A vector of patient index within the population group.
meta <- meta_example() head(collect_population_index(meta, "apat"))
meta <- meta_example() head(collect_population_index(meta, "apat"))
The key variables used in id
, group
, and subset
are displayed by default.
collect_population_record(meta, population, var = NULL)
collect_population_record(meta, population, var = NULL)
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
var |
A character vector of additional variables to be displayed in the output. |
A data frame containing the variables in the population dataset.
meta <- meta_example() head(collect_population_record(meta, "apat")) head(collect_population_record(meta, "apat", var = "AGE"))
meta <- meta_example() head(collect_population_record(meta, "apat")) head(collect_population_record(meta, "apat", var = "AGE"))
Collect specification for title
collect_title( meta, population, observation, parameter, analysis, title_order = c("analysis", "observation", "population") )
collect_title( meta, population, observation, parameter, analysis, title_order = c("analysis", "observation", "population") )
meta |
A |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
analysis |
A character value of analysis term name. The term name is used as key to link information. |
title_order |
A character vector to define the order of title from each component. |
A vector of strings to compose the table captions.
meta <- meta_example() collect_title(meta, "apat", "wk12", "ser", "ae_summary") collect_title(meta, "apat", "wk12", "ser", "ae_specific")
meta <- meta_example() collect_title(meta, "apat", "wk12", "ser", "ae_summary") collect_title(meta, "apat", "wk12", "ser", "ae_specific")
Apply default values to ADaM mappings
default_apply(x)
default_apply(x)
x |
An |
Similar to the input, but with the missing values updated to the default values.
default_apply(adam_mapping(name = "apat"))
default_apply(adam_mapping(name = "apat"))
Define analysis function meta information for ADaM dataset
define_analysis(meta, name, ...)
define_analysis(meta, name, ...)
meta |
A |
name |
A character value of term name. The term name is used as key to link information. |
... |
Additional variables. |
A metadata object with analysis details defined.
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan = plan) |> define_analysis( name = "ae_summary", title = "Summary of Adverse Events" )
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan = plan) |> define_analysis( name = "ae_summary", title = "Summary of Adverse Events" )
Define analysis observation meta information for ADaM dataset
define_observation( meta, name, id = "USUBJID", group = NULL, var = NULL, subset = NULL, label = NULL, ... )
define_observation( meta, name, id = "USUBJID", group = NULL, var = NULL, subset = NULL, label = NULL, ... )
meta |
A |
name |
A character value of term name. The term name is used as key to link information. |
id |
A character value of subject identifier variable name in an ADaM dataset. |
group |
A character vector of group variable names in an ADaM dataset. |
var |
A character vector of useful variable names in an ADaM dataset. |
subset |
An expression to identify analysis records.
See |
label |
A character value of analysis label. |
... |
Additional variables. |
A metadata object with observation defined.
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan = plan) |> define_observation( name = "wk12", group = "TRTA", subset = SAFFL == "Y", label = "Weeks 0 to 12" )
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan = plan) |> define_observation( name = "wk12", group = "TRTA", subset = SAFFL == "Y", label = "Weeks 0 to 12" )
Define analysis parameter meta information for ADaM dataset
define_parameter(meta, name, subset = NULL, ...)
define_parameter(meta, name, subset = NULL, ...)
meta |
A |
name |
A character value of term name. The term name is used as key to link information. |
subset |
An expression to identify analysis records.
See |
... |
Additional variables. |
A metadata object with parameters defined.
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan = plan) |> define_parameter( name = "rel", subset = AEREL %in% c("POSSIBLE", "PROBABLE") )
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan = plan) |> define_parameter( name = "rel", subset = AEREL %in% c("POSSIBLE", "PROBABLE") )
Define analysis plan meta information for ADaM dataset
define_plan(meta, plan)
define_plan(meta, plan)
meta |
A |
plan |
A data frame for analysis plan. |
A metadata object with plans defined.
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan)
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan)
Define analysis population meta information for ADaM dataset
define_population( meta, name, id = "USUBJID", group = NULL, var = NULL, subset = NULL, label = NULL, ... )
define_population( meta, name, id = "USUBJID", group = NULL, var = NULL, subset = NULL, label = NULL, ... )
meta |
A |
name |
A character value of term name. The term name is used as key to link information. |
id |
A character value of subject identifier variable name in an ADaM dataset. |
group |
A character vector of group variable names in an ADaM dataset. |
var |
A character vector of useful variable names in an ADaM dataset. |
subset |
An expression to identify analysis records.
See |
label |
A character value of analysis label. |
... |
Additional variables. |
A metadata object with population defined.
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan) |> define_population(name = "apat")
plan <- plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> define_plan(plan) |> define_population(name = "apat")
A function to get the labels of data frame columns
get_label(data)
get_label(data)
data |
A data frame. |
Labels of the input data frame.
get_label(r2rtf::r2rtf_adae)
get_label(r2rtf::r2rtf_adae)
Create a metadata representation for ADaM data analysis
meta_adam(observation, population = observation)
meta_adam(observation, population = observation)
observation |
A data frame for observation level data. |
population |
A data frame for population level data.
Default is the same as |
An initialized metadata object with observation and population defined.
meta_adam(observation = r2rtf::r2rtf_adae, population = r2rtf::r2rtf_adae)
meta_adam(observation = r2rtf::r2rtf_adae, population = r2rtf::r2rtf_adae)
Add duplicate data to enable a total group
meta_add_total(meta, total = "Total")
meta_add_total(meta, total = "Total")
meta |
A metalite object. |
total |
A character value of total group name. |
A metadata object with a total group added.
x <- meta_add_total(meta_example()) # A `Total` group is added table(x$data_population$TRTA)
x <- meta_add_total(meta_example()) # A `Total` group is added table(x$data_population$TRTA)
Build complete meta information
meta_build(meta)
meta_build(meta)
meta |
A |
A composed metadata object.
meta_adam( observation = r2rtf::r2rtf_adae, population = r2rtf::r2rtf_adsl ) |> # define analysis plan define_plan( plan( analysis = "ae_summary", population = "apat", observation = c("wk12"), parameter = "any;rel" ) ) |> # define population define_population( name = "apat", group = "TRT01A", subset = SAFFL == "Y" ) |> # define observation define_observation( name = "wk12", group = "TRTA", subset = SAFFL == "Y", label = "Weeks 0 to 12" ) |> # define parameter - rel define_parameter( name = "rel", subset = AEREL %in% c("POSSIBLE", "PROBABLE") ) |> # define analysis define_parameter( name = "rel", subset = AEREL %in% c("POSSIBLE", "PROBABLE") ) |> meta_build()
meta_adam( observation = r2rtf::r2rtf_adae, population = r2rtf::r2rtf_adsl ) |> # define analysis plan define_plan( plan( analysis = "ae_summary", population = "apat", observation = c("wk12"), parameter = "any;rel" ) ) |> # define population define_population( name = "apat", group = "TRT01A", subset = SAFFL == "Y" ) |> # define observation define_observation( name = "wk12", group = "TRTA", subset = SAFFL == "Y", label = "Weeks 0 to 12" ) |> # define parameter - rel define_parameter( name = "rel", subset = AEREL %in% c("POSSIBLE", "PROBABLE") ) |> # define analysis define_parameter( name = "rel", subset = AEREL %in% c("POSSIBLE", "PROBABLE") ) |> meta_build()
meta_adam
objectThis function is only for illustration purposes. The r2rtf package is required.
meta_example()
meta_example()
A metadata object.
meta_example()
meta_example()
meta_adam
objectCreate a data exploration meta_adam
object
meta_example_exploration( data, group, name = "ase", subset = NULL, label = "All Subjects Enrolled" )
meta_example_exploration( data, group, name = "ase", subset = NULL, label = "All Subjects Enrolled" )
data |
A data frame. |
group |
A character vector of group variable names in an ADaM dataset. |
name |
A character value of term name. The term name is used as key to link information. |
subset |
An expression to identify analysis records.
See |
label |
A character value of analysis label. |
A metadata object.
meta <- meta_example_exploration(r2rtf::r2rtf_adsl, group = "TRT01A") collect_n_subject(meta, "ase", "AGE") collect_n_subject(meta, "ase", "SEX")
meta <- meta_example_exploration(r2rtf::r2rtf_adsl, group = "TRT01A") collect_n_subject(meta, "ase", "AGE") collect_n_subject(meta, "ase", "SEX")
Inherit meta information by keywords
meta_inherit(meta, inherit, name, overwrite = FALSE)
meta_inherit(meta, inherit, name, overwrite = FALSE)
meta |
A |
inherit |
A |
name |
A vector of keywords from |
overwrite |
A logical value to force mapping update. |
A metadata object with population defined.
meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> meta_inherit(meta_example(), c("apat", "wk12", "ae_summary"))
meta_adam( population = r2rtf::r2rtf_adsl, observation = r2rtf::r2rtf_adae ) |> meta_inherit(meta_example(), c("apat", "wk12", "ae_summary"))
Execute analysis based on the analysis plan
meta_run(meta, i = NULL, ...)
meta_run(meta, i = NULL, ...)
meta |
A |
i |
A vector of integers to indicate |
... |
Additional arguments passed to |
Executed analysis based on the analysis plan.
if (interactive()) { meta <- meta_example() ae_summary <- function(...) { "results of ae_summary" } ae_specific <- function(...) { "results of ae_specific" } meta_run(meta) meta_run(meta, i = 2) }
if (interactive()) { meta <- meta_example() ae_summary <- function(...) { "results of ae_summary" } ae_specific <- function(...) { "results of ae_specific" } meta_run(meta) meta_run(meta, i = 2) }
Split metadata into groups
meta_split(meta, by)
meta_split(meta, by)
meta |
A |
by |
A character variable name both in population level and observation level data of a metadata object. |
A metadata object split by the input variable.
meta_example() |> meta_split("RACE")
meta_example() |> meta_split("RACE")
Count number of unique subjects
n_subject( id, group, par = NULL, na = "Missing", use_na = c("ifany", "no", "always") )
n_subject( id, group, par = NULL, na = "Missing", use_na = c("ifany", "no", "always") )
id |
A character vector of subject identifier. |
group |
A factor vector of group name. |
par |
A character vector of parameter name. |
na |
A character string used to label missing values. Defaults to |
use_na |
A character value for whether to include |
A data frame summarizing the number of unique subjects in different arms.
library(r2rtf) r2rtf_adae$TRTA <- factor(r2rtf_adae$TRTA) r2rtf_adae$SEX[1:5] <- NA n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA) n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX) n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX, use_na = "always") n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX, na = "Null")
library(r2rtf) r2rtf_adae$TRTA <- factor(r2rtf_adae$TRTA) r2rtf_adae$SEX[1:5] <- NA n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA) n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX) n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX, use_na = "always") n_subject(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$SEX, na = "Null")
outdata
classThe outdata
class defines a standard output format for
analysis and reporting.
outdata( meta, population, observation, parameter, n, order, group, reference_group, ... )
outdata( meta, population, observation, parameter, n, order, group, reference_group, ... )
meta |
A metadata object created by metalite. |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
n |
A data frame for number of subjects in each criteria. |
order |
A numeric vector of row display order. |
group |
A character vector of group variable names in an ADaM dataset. |
reference_group |
A numeric value to indicate reference group in levels of group. |
... |
Additional variables to save to |
The design is inspired by ggplot2::aes()
.
A list with class outdata
.
Components of the list are either quosures or constants.
outdata( meta = meta_example(), population = "apat", observation = "wk12", parameter = "rel", n = data.frame( TRTA = c("Placebo", "Xanomeline Low Dose", "Xanomeline High Dose"), n = c(86, 84, 84) ), group = "TRTA", reference_group = 1, order = 1:3 )
outdata( meta = meta_example(), population = "apat", observation = "wk12", parameter = "rel", n = data.frame( TRTA = c("Placebo", "Xanomeline Low Dose", "Xanomeline High Dose"), n = c(86, 84, 84) ), group = "TRTA", reference_group = 1, order = 1:3 )
This function is a wrapper of base::expand.grid()
.
plan(analysis, population, observation, parameter, mock = 1, ...)
plan(analysis, population, observation, parameter, mock = 1, ...)
analysis |
A character value of analysis term name. The term name is used as key to link information. |
population |
A character value of population term name. The term name is used as key to link information. |
observation |
A character value of observation term name. The term name is used as key to link information. |
parameter |
A character value of parameter term name. The term name is used as key to link information. |
mock |
A numeric value of mock table number. |
... |
Additional arguments. |
A data frame containing the analysis plan.
# Example 1 # Create an analysis plan of AE summary # with any AE, drug-related AE, and serious AE plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) # Example 2 # Create an analysis plan of AE specific # with any AE, drug-related AE, and serious AE plan( analysis = "ae_specific", population = "apat", observation = c("wk12", "wk24"), parameter = c("any", "rel", "ser") )
# Example 1 # Create an analysis plan of AE summary # with any AE, drug-related AE, and serious AE plan( analysis = "ae_summary", population = "apat", observation = c("wk12", "wk24"), parameter = "any;rel;ser" ) # Example 2 # Create an analysis plan of AE specific # with any AE, drug-related AE, and serious AE plan( analysis = "ae_specific", population = "apat", observation = c("wk12", "wk24"), parameter = c("any", "rel", "ser") )
Print a metadata object with its population, observation, and analysis plans
## S3 method for class 'meta_adam' print(x, ...)
## S3 method for class 'meta_adam' print(x, ...)
x |
An object returned by |
... |
Additional parameters for |
A printed summary of the metadata.
meta_adam(observation = r2rtf::r2rtf_adae, population = r2rtf::r2rtf_adae) |> print()
meta_adam(observation = r2rtf::r2rtf_adae, population = r2rtf::r2rtf_adae) |> print()
Specification for population definition
spec_analysis_population(meta)
spec_analysis_population(meta)
meta |
A |
A vector of character strings containing the populations used in the order of the analysis plans.
meta <- meta_example() spec_analysis_population(meta)
meta <- meta_example() spec_analysis_population(meta)
Specification for analysis call program
spec_call_program(meta, ...)
spec_call_program(meta, ...)
meta |
A |
... |
Additional arguments used in all call programs. |
A vector of character strings containing the call program in the order of the analysis plans.
meta <- meta_example() spec_call_program(meta) spec_call_program(meta, data_source = "[Study CDISCpilot: adam-adsl; adae]")
meta <- meta_example() spec_call_program(meta) spec_call_program(meta, data_source = "[Study CDISCpilot: adam-adsl; adae]")
Specification for analysis output filename
spec_filename(meta)
spec_filename(meta)
meta |
A |
A vector of character strings containing the RTF file names.
meta <- meta_example() spec_filename(meta)
meta <- meta_example() spec_filename(meta)
Specification for analysis title
spec_title(meta)
spec_title(meta)
meta |
A |
A vector of character strings containing the table captions in the order of the analysis plans.
meta <- meta_example() spec_title(meta)
meta <- meta_example() spec_title(meta)
adam_mapping
Update mapping rule in adam_mapping
update_adam_mapping(meta, name, ...)
update_adam_mapping(meta, name, ...)
meta |
A |
name |
A vector of keywords. |
... |
Additional variables to be added in the mapping rule among those keywords. |
A metadata object with the input updated.
meta <- meta_example() meta <- update_adam_mapping(meta, names(meta$parameter), start_date = "ASTDT") collect_adam_mapping(meta, "ser")
meta <- meta_example() meta <- update_adam_mapping(meta, names(meta$parameter), start_date = "ASTDT") collect_adam_mapping(meta, "ser")