Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace TealData with teal_data in the docs #845

Closed
wants to merge 11 commits into from
4 changes: 2 additions & 2 deletions R/tm_a_gee.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ template_a_gee <- function(output_table,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADQS", adqs)
Comment on lines -146 to -147
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was not the case before, But I think we should make the teal_data object reproducible so that the code in the Show R code works. Right now it won't work because the data creation code is not specified.

@kartikeyakirar what do you think about adding it for all the examples so they are improved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its good idea. However, considering that these are for example for TMC modules and the preprocessing code be lengthy in some cases, which in turn might elongate the 'cdisc_data' call, I would lean towards not including it in for all the examples.
@gogonzo @donyunardi WDYT?

Copy link
Contributor

@vedhav vedhav Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need to specify the code anymore, we have the new within() function. I think we need to document it as I believe it's the best practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are very few examples like that, and it's included in most of the tmg examples. I will make the update.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vedhav I think this qualifies to another issue. @kartikeyakirar feel free to make code reproducible or keep as reproducible as it was before. We need this soon on @main so I advise to make this branch ready as quick as possible.

#' ADSL = adsl,
#' ADQS = adqs
#' ),
#' modules = modules(
#' tm_a_gee(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_a_mmrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ template_mmrm_plots <- function(fit_name,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADQS", adqs)
#' ADSL = adsl,
#' ADQS = adqs
#' ),
#' modules = modules(
#' tm_a_mmrm(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae)
#' ADSL = adsl,
#' ADAE = adae
#' ),
#' modules = modules(
#' tm_g_barchart_simple(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ template_g_ci <- function(dataname, # nolint
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_g_ci(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_forest_rsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ template_forest_rsp <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADRS", adrs)
#' ADSL = adsl,
#' ADRS = adrs
#' ),
#' modules = modules(
#' tm_g_forest_rsp(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_forest_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ template_forest_tte <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADTTE", adtte)
#' ADSL = adsl,
#' ADTTE = adtte
#' ),
#' modules = modules(
#' tm_g_forest_tte(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_ipp.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ template_g_ipp <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_g_ipp(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_km.R
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ template_g_km <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADTTE", adtte)
#' ADSL = adsl,
#' ADTTE = adtte
#' ),
#' modules = modules(
#' tm_g_km(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ template_g_lineplot <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_g_lineplot(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_pp_adverse_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ template_adverse_events <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae)
#' ADSL = adsl,
#' ADAE = adae
#' ),
#' modules = modules(
#' tm_g_pp_adverse_events(
Expand Down
6 changes: 3 additions & 3 deletions R/tm_g_pp_patient_timeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ template_patient_timeline <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae),
#' cdisc_dataset("ADCM", adcm, keys = adcm_keys)
#' ADSL = adsl,
#' ADAE = adae,
#' ADCM = adcm # TODO use adcm_keys
#' ),
#' modules = modules(
#' tm_g_pp_patient_timeline(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ template_therapy <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADCM", adcm, keys = adcm_keys)
#' ADSL = adsl,
#' ADCM = adcm # TODO use adcm_keys
#' ),
#' modules = modules(
#' tm_g_pp_therapy(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ template_vitals <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADVS", advs)
#' ADSL = adsl,
#' ADVS = advs
#' ),
#' modules = modules(
#' tm_g_pp_vitals(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_abnormality.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ template_abnormality <- function(parentname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_t_abnormality(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_abnormality_by_worst_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ template_abnormality_by_worst_grade <- function(parentname, # nolint
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_t_abnormality_by_worst_grade(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ template_ancova <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADQS", adqs)
#' ADSL = adsl,
#' ADQS = adqs
#' ),
#' modules = modules(
#' tm_t_ancova(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_binary_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ template_binary_outcome <- function(dataname,
#' )
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADRS", adrs)
#' ADSL = adsl,
#' ADRS = adrs
#' ),
#' modules = modules(
#' tm_t_binary_outcome(
Expand Down
13 changes: 4 additions & 9 deletions R/tm_t_coxreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ template_coxreg_m <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADTTE", adtte)
#' ADSL = adsl,
#' ADTTE = adtte
#' ),
#' modules = modules(
#' tm_t_coxreg(
Expand Down Expand Up @@ -439,13 +439,8 @@ template_coxreg_m <- function(dataname,
#' arm_ref_comp <- list(ARMCD = list(ref = "ARM A", comp = c("ARM B")))
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset(
#' dataname = "ADSL",
#' x = adsl
#' ),
#' cdisc_dataset(
#' dataname = "ADTTE",
#' x = adtte
#' ADSL = adsl,
#' ADTTE = adtte
#' )
#' ),
#' modules = modules(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ template_events <- function(dataname,
#'
#' app <- teal::init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae)
#' ADSL = adsl,
#' ADAE = adae
#' ),
#' modules = modules(
#' tm_t_events(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,8 @@ template_events_col_by_grade <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae)
#' ADSL = adsl,
#' ADAE = adae
#' ),
#' modules = modules(
#' tm_t_events_by_grade(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events_patyear.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ template_events_patyear <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAETTE", adaette)
#' ADSL = adsl,
#' ADAETTE = adaette
#' ),
#' modules = modules(
#' tm_t_events_patyear(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ template_events_summary <- function(anl_name,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae)
#' ADSL = adsl,
#' ADAE = adae
#' ),
#' modules = modules(
#' tm_t_events_summary(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_exposure.R
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ template_exposure <- function(parentname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADEX", adex)
#' ADSL = adsl,
#' ADEX = adex
#' ),
#' modules = modules(
#' tm_t_exposure(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_logistic.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ template_logistic <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADRS", adrs)
#' ADSL = adsl,
#' ADRS = adrs
#' ),
#' modules = modules(
#' tm_t_logistic(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_mult_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ template_mult_events <- function(dataname,
#'
#' app <- teal::init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADCM", adcm, keys = adcm_keys)
#' ADSL = adsl,
#' ADCM = adcm # TODO use adcm_keys
#' ),
#' modules = modules(
#' tm_t_mult_events(
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_pp_basic_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ template_basic_info <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl)
#' ADSL = adsl
#' ),
#' modules = modules(
#' tm_t_pp_basic_info(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_pp_laboratory.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ template_laboratory <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_t_pp_laboratory(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_pp_medical_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ template_medical_history <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADMH", admh)
#' ADSL = adsl,
#' ADMH = admh
#' ),
#' modules = modules(
#' tm_t_pp_medical_history(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_pp_prior_medication.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ template_prior_medication <- function(dataname = "ANL",
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADCM", adcm, keys = adcm_keys)
#' ADSL = adsl,
#' ADCM = adcm
#' ),
#' modules = modules(
#' tm_t_pp_prior_medication(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_shift_by_arm.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ template_shift_by_arm <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADEG", adeg)
#' ADSL = adsl,
#' ADEG = adeg
#' ),
#' modules = modules(
#' tm_t_shift_by_arm(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_shift_by_arm_by_worst.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ template_shift_by_arm_by_worst <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADEG", adeg)
#' ADSL = adsl,
#' ADEG = adeg
#' ),
#' modules = modules(
#' tm_t_shift_by_arm_by_worst(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_shift_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ template_shift_by_grade <- function(parentname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_t_shift_by_grade(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_smq.R
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ template_smq <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADAE", adae)
#' ADSL = adsl,
#' ADAE = adae
#' ),
#' modules = modules(
#' tm_t_smq(
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ template_summary <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl)
#' ADSL = adsl
#' ),
#' modules = modules(
#' tm_t_summary(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_summary_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ template_summary_by <- function(parentname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' cdisc_dataset("ADLB", adlb)
#' ADSL = adsl,
#' ADLB = adlb
#' ),
#' modules = modules(
#' tm_t_summary_by(
Expand Down
Loading