From 5fc88d1dafe39c24f9f9897eacfad0014c1c7dce Mon Sep 17 00:00:00 2001 From: vedhav Date: Tue, 13 Aug 2024 17:16:02 +0530 Subject: [PATCH] fix: remove dplyr pipe --- custom-transform/app.R | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/custom-transform/app.R b/custom-transform/app.R index 24acbdf5..07343b30 100644 --- a/custom-transform/app.R +++ b/custom-transform/app.R @@ -80,16 +80,16 @@ my_transformers <- list( ) ) -data <- teal_data() %>% - within({ - ADSL <- teal.data::rADSL - ADTTE <- teal.data::rADTTE - iris <- iris +data <- teal_data() +data <- within(data, { + ADSL <- teal.data::rADSL + ADTTE <- teal.data::rADTTE + iris <- iris - CO2 <- CO2 - factors <- names(Filter(isTRUE, vapply(CO2, is.factor, logical(1L)))) - CO2[factors] <- lapply(CO2[factors], as.character) - }) + CO2 <- CO2 + factors <- names(Filter(isTRUE, vapply(CO2, is.factor, logical(1L)))) + CO2[factors] <- lapply(CO2[factors], as.character) +}) join_keys(data) <- default_cdisc_join_keys[c("ADSL", "ADTTE")] teal.data::datanames(data) <- c("ADSL", "ADTTE", "iris", "CO2")