From ed0151adddc86944b64437b6897c530600a69776 Mon Sep 17 00:00:00 2001 From: Dony Unardi Date: Fri, 16 Sep 2022 14:17:40 -0700 Subject: [PATCH] update link and examples --- R/tm_g_lineplot.R | 7 +++++-- R/utils.R | 12 ++++++++++-- README.md | 2 +- man/call_concatenate.Rd | 12 ++++++++++-- man/tm_g_lineplot.Rd | 7 +++++-- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/R/tm_g_lineplot.R b/R/tm_g_lineplot.R index b704745d1b..00acbffec3 100644 --- a/R/tm_g_lineplot.R +++ b/R/tm_g_lineplot.R @@ -215,8 +215,11 @@ template_g_lineplot <- function(dataname = "ANL", #' app <- init( #' data = cdisc_data( #' cdisc_dataset("ADSL", ADSL, code = 'ADSL <- synthetic_cdisc_data("latest")$adsl'), -#' cdisc_dataset("ADLB", ADLB, code = 'ADLB <- synthetic_cdisc_data("latest")$adlb -#' ADLB <- dplyr::mutate(ADLB, AVISIT == forcats::fct_reorder(AVISIT, AVISITN, min))'), +#' cdisc_dataset( +#' "ADLB", ADLB, +#' code = 'ADLB <- synthetic_cdisc_data("latest")$adlb +#' ADLB <- dplyr::mutate(ADLB, AVISIT == forcats::fct_reorder(AVISIT, AVISITN, min))' +#' ), #' check = TRUE #' ), #' modules = modules( diff --git a/R/utils.R b/R/utils.R index 9caa961ac4..c446c73ea7 100644 --- a/R/utils.R +++ b/R/utils.R @@ -19,9 +19,17 @@ #' call_concatenate(list(quote(f), quote(g), quote(h))) #' call_concatenate(list(quote(f))) #' call_concatenate(list()) -#' call_concatenate(list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg))))) +#' call_concatenate( +#' list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg)))) +#' ) +#' +#' eval( +#' call_concatenate( +#' list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg)))) +#' ) +#' ) +#' #' -#' eval(call_concatenate(list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg)))))) #' } call_concatenate <- function(args, bin_op = "+") { checkmate::assert_string(bin_op) diff --git a/README.md b/README.md index 45d9639cab..5768c4d14d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ These modules include, but are not limited to: - `tm_g_pp_patient_timeline`: general timeline for individual patients - ... -Most of the modules in `teal.modules.clinical` use functions from the R package [tern](https://insightsengineering.github.io/tern) in order to produce their output. +Most of the modules in `teal.modules.clinical` use functions from the R package [tern](https://insightsengineering.github.io/tern/) in order to produce their output. ## Installation diff --git a/man/call_concatenate.Rd b/man/call_concatenate.Rd index bd25f3b5c4..daee73a9b4 100644 --- a/man/call_concatenate.Rd +++ b/man/call_concatenate.Rd @@ -26,8 +26,16 @@ Reduce(function(existing, new) call("+", existing, new), list(quote(f), quote(g) call_concatenate(list(quote(f), quote(g), quote(h))) call_concatenate(list(quote(f))) call_concatenate(list()) -call_concatenate(list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg))))) +call_concatenate( + list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg)))) +) + +eval( + call_concatenate( + list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg)))) + ) +) + -eval(call_concatenate(list(quote(ggplot2::ggplot(mtcars)), quote(ggplot2::geom_point(ggplot2::aes(wt, mpg)))))) } } diff --git a/man/tm_g_lineplot.Rd b/man/tm_g_lineplot.Rd index 7de7bc9b81..f22ac7ae22 100644 --- a/man/tm_g_lineplot.Rd +++ b/man/tm_g_lineplot.Rd @@ -135,8 +135,11 @@ ADLB <- dplyr::mutate(ADLB, AVISIT == forcats::fct_reorder(AVISIT, AVISITN, min) app <- init( data = cdisc_data( cdisc_dataset("ADSL", ADSL, code = 'ADSL <- synthetic_cdisc_data("latest")$adsl'), - cdisc_dataset("ADLB", ADLB, code = 'ADLB <- synthetic_cdisc_data("latest")$adlb - ADLB <- dplyr::mutate(ADLB, AVISIT == forcats::fct_reorder(AVISIT, AVISITN, min))'), + cdisc_dataset( + "ADLB", ADLB, + code = 'ADLB <- synthetic_cdisc_data("latest")$adlb + ADLB <- dplyr::mutate(ADLB, AVISIT == forcats::fct_reorder(AVISIT, AVISITN, min))' + ), check = TRUE ), modules = modules(