diff --git a/latest-tag/search.json b/latest-tag/search.json index 106de850..d03bb057 100644 --- a/latest-tag/search.json +++ b/latest-tag/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"πŸ™ Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"πŸ‘Ά Getting started πŸ“” Code Conduct πŸ—ƒ License πŸ“œ Issues 🚩 Pull requests πŸ’» Coding guidelines πŸ† Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue πŸ‘. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! πŸŽ‰ now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract-merge.html","id":"combining-data-extract-with-data-merge","dir":"Articles","previous_headings":"","what":"Combining data-extract with data-merge","title":"Combining data-extract with data-merge","text":"teal.transform provides merge_expression_srv converts data_extract_srv R expression transform data analytical purposes. example, may wish select AGE ADSL select AVAL ADTTE filtered rows PARAMCD OS merge results (using primary keys) create analysis dataset ANL used module, diagram shows: following code block create data_extract_spec object per dataset illustrated .","code":"library(teal.transform) #> Loading required package: magrittr library(shiny) adsl_extract <- teal.transform::data_extract_spec( dataname = \"ADSL\", select = select_spec( label = \"Select variable:\", choices = c(\"AGE\", \"BMRKR1\"), selected = \"AGE\", multiple = TRUE, fixed = FALSE ) ) adtte_extract <- teal.transform::data_extract_spec( dataname = \"ADTTE\", select = select_spec( choices = c(\"AVAL\", \"ASEQ\"), selected = \"AVAL\", multiple = TRUE, fixed = FALSE ), filter = filter_spec( vars = \"PARAMCD\", choices = c(\"CRSD\", \"EFS\", \"OS\", \"PFS\"), selected = \"OS\" ) ) data_extracts <- list(adsl_extract = adsl_extract, adtte_extract = adtte_extract)"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract-merge.html","id":"example-module","dir":"Articles","previous_headings":"","what":"Example module","title":"Combining data-extract with data-merge","text":", create merge_ui merge_srv functions used create ui srv components shiny app, respectively. Output data_extract_srv (reactive) passed merge_expression_srv together datasets (list data.frame objects) join_keys list. merge_expression_srv returns reactive list containing merge expression information needed perform transformation - see merge_expression_srv documentation.","code":"merge_ui <- function(id, data_extracts) { ns <- NS(id) teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(ns(\"expr\")), dataTableOutput(ns(\"data\")) ), encoding = div( teal.transform::data_extract_ui( ns(\"adsl_extract\"), # must correspond with data_extracts list names label = \"ADSL extract\", data_extracts[[1]] ), teal.transform::data_extract_ui( ns(\"adtte_extract\"), # must correspond with data_extracts list names label = \"ADTTE extract\", data_extracts[[2]] ) ) ) } merge_srv <- function(id, datasets, data_extracts, join_keys) { moduleServer(id, function(input, output, session) { selector_list <- teal.transform::data_extract_multiple_srv(data_extracts, datasets, join_keys) merged_data <- teal.transform::merge_expression_srv( selector_list = selector_list, datasets = datasets, join_keys = join_keys, merge_function = \"dplyr::left_join\" ) ANL <- reactive({ # nolint eval(envir = list2env(datasets), expr = as.expression(merged_data()$expr)) }) output$expr <- renderText(paste(merged_data()$expr, collapse = \"\\n\")) output$data <- renderDataTable(ANL()) }) }"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract-merge.html","id":"example-data","dir":"Articles","previous_headings":"","what":"Example data","title":"Combining data-extract with data-merge","text":"data_extract_srv module depends either list reactive non-reactive data.frame objects. , show usage list data.frame objects input datasets list necessary join keys per data.frame object required:","code":"# Define data.frame objects ADSL <- teal.transform::rADSL # nolint ADTTE <- teal.transform::rADTTE # nolint # create a list of data.frame objects datasets <- list(ADSL = ADSL, ADTTE = ADTTE) # create join_keys join_keys <- teal.data::join_keys( teal.data::join_key(\"ADSL\", \"ADSL\", c(\"STUDYID\", \"USUBJID\")), teal.data::join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\", \"USUBJID\")), teal.data::join_key(\"ADTTE\", \"ADTTE\", c(\"STUDYID\", \"USUBJID\", \"PARAMCD\")) )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract-merge.html","id":"shiny-app","dir":"Articles","previous_headings":"","what":"Shiny app","title":"Combining data-extract with data-merge","text":"Finally, pass merge_ui merge_srv ui server functions shinyApp using data_extracts defined first code block datasets object:","code":"shinyApp( ui = fluidPage(merge_ui(\"data_merge\", data_extracts)), server = function(input, output, session) { merge_srv(\"data_merge\", datasets, data_extracts, join_keys) } )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract.html","id":"data_extract_spec","dir":"Articles","previous_headings":"","what":"data_extract_spec","title":"Data extract","text":"data_extract_spec’s task two-fold: create UI component shiny application pass user input UI module . formulated, let’s look supports responsibilities.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract.html","id":"example-module","dir":"Articles","previous_headings":"data_extract_spec","what":"Example module","title":"Data extract","text":"order showcase different initialization options data_extract_spec, first define shiny module uses data_extract_ui data_extract_srv designed handle data_extract_spec objects. module creates UI component single data_extract_spec prints list values returned data_extract_srv module. Please see package documentation information data_extract_ui data_extract_srv.","code":"library(teal.transform) #> Loading required package: magrittr library(shiny) extract_ui <- function(id, data_extract) { ns <- NS(id) teal.widgets::standard_layout( output = teal.widgets::white_small_well(verbatimTextOutput(ns(\"output\"))), encoding = data_extract_ui(ns(\"data_extract\"), label = \"variable\", data_extract) ) } extract_srv <- function(id, datasets, data_extract, join_keys) { moduleServer(id, function(input, output, session) { reactive_extract_input <- data_extract_srv(\"data_extract\", datasets, data_extract, join_keys) s <- reactive({ format_data_extract(reactive_extract_input()) }) output$output <- renderPrint({ cat(s()) }) }) }"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract.html","id":"example-data","dir":"Articles","previous_headings":"data_extract_spec","what":"Example data","title":"Data extract","text":"data_extract_srv module depends either list reactive non-reactive data.frame objects. , show usage list data.frame objects input datasets list necessary join keys per data.frame object required: Consider following example, create two UI elements, one filter specific level SEX variable, second one select variable c(\"BMRKR1\", \"AGE\"). data_extract_spec object handed shiny app gives instructions generate UI components.","code":"# Define data.frame objects ADSL <- teal.transform::rADSL # nolint ADTTE <- teal.transform::rADTTE # nolint # create a list of data.frame objects datasets <- list(ADSL = ADSL, ADTTE = ADTTE) # create join_keys join_keys <- teal.data::join_keys( teal.data::join_key(\"ADSL\", \"ADSL\", c(\"STUDYID\", \"USUBJID\")), teal.data::join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\", \"USUBJID\")), teal.data::join_key(\"ADTTE\", \"ADTTE\", c(\"STUDYID\", \"USUBJID\", \"PARAMCD\")) ) simple_des <- data_extract_spec( dataname = \"ADSL\", filter = filter_spec(vars = \"SEX\", choices = c(\"F\", \"M\")), select = select_spec(choices = c(\"BMRKR1\", \"AGE\")) )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-extract.html","id":"shiny-app","dir":"Articles","previous_headings":"data_extract_spec","what":"Shiny app","title":"Data extract","text":"Finally, pass extract_ui ui shinyApp use extract_srv server function shinyApp:","code":"shinyApp( ui = fluidPage(extract_ui(\"data_extract\", simple_des)), server = function(input, output, session) { extract_srv(\"data_extract\", datasets, simple_des, join_keys) } )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"merge_expression_module","dir":"Articles","previous_headings":"","what":"merge_expression_module","title":"Data merge","text":"merge_expression_module solely, need list data_extract_spec objects data_extract argument, list reactive non-reactive data.frame objects list join keys corresponding every data.frame object.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"app-code","dir":"Articles","previous_headings":"merge_expression_module","what":"App code","title":"Data merge","text":"","code":"library(teal.transform) #> Loading required package: magrittr library(shiny) adsl_extract <- teal.transform::data_extract_spec( dataname = \"ADSL\", select = select_spec( label = \"Select variable:\", choices = c(\"AGE\", \"BMRKR1\"), selected = \"AGE\", multiple = TRUE, fixed = FALSE ) ) adtte_extract <- teal.transform::data_extract_spec( dataname = \"ADTTE\", select = select_spec( choices = c(\"AVAL\", \"ASEQ\"), selected = \"AVAL\", multiple = TRUE, fixed = FALSE ) ) data_extracts <- list(adsl_extract = adsl_extract, adtte_extract = adtte_extract) merge_ui <- function(id, data_extracts) { ns <- NS(id) teal.widgets::standard_layout( output = teal.widgets::white_small_well( verbatimTextOutput(ns(\"expr\")), dataTableOutput(ns(\"data\")) ), encoding = div( teal.transform::data_extract_ui( ns(\"adsl_extract\"), # must correspond with data_extracts list names label = \"ADSL extract\", data_extracts[[1]] ), teal.transform::data_extract_ui( ns(\"adtte_extract\"), # must correspond with data_extracts list names label = \"ADTTE extract\", data_extracts[[2]] ) ) ) } merge_module <- function(id, datasets, data_extracts, join_keys) { moduleServer(id, function(input, output, session) { merged_data <- teal.transform::merge_expression_module( data_extract = data_extracts, datasets = datasets, join_keys = join_keys, merge_function = \"dplyr::left_join\" ) ANL <- reactive({ # nolint eval(envir = list2env(datasets), expr = as.expression(merged_data()$expr)) }) output$expr <- renderText(paste(merged_data()$expr, collapse = \"\\n\")) output$data <- renderDataTable(ANL()) }) } # Define data.frame objects ADSL <- teal.transform::rADSL # nolint ADTTE <- teal.transform::rADTTE # nolint # create a list of data.frame objects datasets <- list(ADSL = ADSL, ADTTE = ADTTE) # create join_keys join_keys <- teal.data::join_keys( teal.data::join_key(\"ADSL\", \"ADSL\", c(\"STUDYID\", \"USUBJID\")), teal.data::join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\", \"USUBJID\")), teal.data::join_key(\"ADTTE\", \"ADTTE\", c(\"STUDYID\", \"USUBJID\", \"PARAMCD\")) )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"shiny-app","dir":"Articles","previous_headings":"merge_expression_module","what":"Shiny app","title":"Data merge","text":"","code":"shinyApp( ui = fluidPage(merge_ui(\"data_merge\", data_extracts)), server = function(input, output, session) { merge_module(\"data_merge\", datasets, data_extracts, join_keys) } )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"data_extract_multiple_srv-merge_expression_srv","dir":"Articles","previous_headings":"","what":"data_extract_multiple_srv + merge_expression_srv","title":"Data merge","text":"scenario , user deselects ADTTE variable, merging ADTTE ADSL still take place even though ADTTE used needed . , developer might update selector_list input reactive manner gets updated based conditions set developer. , reuse input update app server adtte_extract removed selector_list input ADTTE variable selected reactive_selector_list passed merge_expression_srv:","code":"merge_module <- function(id, datasets, data_extracts, join_keys) { moduleServer(id, function(input, output, session) { selector_list <- teal.transform::data_extract_multiple_srv(data_extracts, datasets, join_keys) reactive_selector_list <- reactive({ if (is.null(selector_list()$adtte_extract) || length(selector_list()$adtte_extract()$select) == 0) { selector_list()[names(selector_list()) != \"adtte_extract\"] } else { selector_list() } }) merged_data <- teal.transform::merge_expression_srv( selector_list = reactive_selector_list, datasets = datasets, join_keys = join_keys, merge_function = \"dplyr::left_join\" ) ANL <- reactive({ # nolint eval(envir = list2env(datasets), expr = as.expression(merged_data()$expr)) }) output$expr <- renderText(paste(merged_data()$expr, collapse = \"\\n\")) output$data <- renderDataTable(ANL()) }) }"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"shiny-app-1","dir":"Articles","previous_headings":"data_extract_multiple_srv + merge_expression_srv","what":"Shiny app","title":"Data merge","text":"merge_expression_module replaced three parts: selector_list: output data_extract_multiple_srv loops list data_extract given runs data_extract_srv one returning list reactive objects. reactive_selector_list: intermediate reactive list updating selector_list content merged_data: output merge_expression_srv using reactive_selector_list input","code":"shinyApp( ui = fluidPage(merge_ui(\"data_merge\", data_extracts)), server = function(input, output, session) { merge_module(\"data_merge\", datasets, data_extracts, join_keys) } )"},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"output-from-merging","dir":"Articles","previous_headings":"","what":"Output from merging","title":"Data merge","text":"merge functions, merge_expression_srv merge_expression_module, return reactive object contains list following elements: expr: code needed replicate merged dataset columns_source: list columns selected per selector keys: keys merged dataset filter_info: filters applied data elements can used inside server retrieve use information selections, data, filters, …","code":""},{"path":"https://insightsengineering.github.io/teal.transform/articles/data-merge.html","id":"merging-of-non-cdisc-datasets","dir":"Articles","previous_headings":"","what":"Merging of non CDISC datasets","title":"Data merge","text":"General datasets share relationships CDISC datasets thus relationships must specified join_keys functions. information, please refer Join Keys vignette. data merge module respects relationships given user case multiple datasets merge, order specified order elements data_extract argument merge_expression_module function. Merging groups datasets complex relationships can quickly become challenging specify please take extra care setting .","code":""},{"path":"https://insightsengineering.github.io/teal.transform/articles/teal-transform.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting started with `teal.transform`","text":"teal.transform package teal framework provides: teal module developers way standardize UI selecting columns datasets merge datasets create analysis dataset used inside module teal application developers way specify columns datasets can used UI selecting columns applications","code":""},{"path":"https://insightsengineering.github.io/teal.transform/articles/teal-transform.html","id":"data-extract-and-data-merge","dir":"Articles","previous_headings":"","what":"Data Extract and Data Merge","title":"Getting started with `teal.transform`","text":"information selecting columns data see data extract vignette. information merging data see data merge vignette. information using extraction merge together see Combining data-extract data-merge vignette.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Pawel Rucki. Author. Mahmoud Hallal. Author. Nikolas Burkoff. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Rucki P, Hallal M, Burkoff N, Nasinski M, Pagacz K, Zhao J (2023). teal.transform: Functions Extracting Merging Data 'teal' Framework. R package version 0.4.0.","code":"@Manual{, title = {teal.transform: Functions for Extracting and Merging Data in the `teal` Framework}, author = {Dawid Kaledkowski and Pawel Rucki and Mahmoud Hallal and Nikolas Burkoff and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2023}, note = {R package version 0.4.0}, }"},{"path":"https://insightsengineering.github.io/teal.transform/index.html","id":"tealtransform","dir":"","previous_headings":"","what":"Functions for Extracting and Merging Data in the `teal` Framework","title":"Functions for Extracting and Merging Data in the `teal` Framework","text":"package contains functions shiny modules extracting merging data within teal framework.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Functions for Extracting and Merging Data in the `teal` Framework","text":"July 2023 insightsengineering packages available r-universe. See package vignettes browseVignettes(package = \"teal.transform\") usage package.","code":"# stable versions install.packages('teal.transform', repos = c('https://insightsengineering.r-universe.dev', 'https://cloud.r-project.org')) # beta versions install.packages('teal.transform', repos = c('https://pharmaverse.r-universe.dev', 'https://cloud.r-project.org'))"},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/pull_request_template.html","id":null,"dir":"","previous_headings":"","what":"Pull Request","title":"Pull Request","text":"Fixes #nnn","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":null,"dir":"Reference","previous_headings":"","what":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Abstract data type stores returns number elements. Queue object stores elements single vector, thus data types can stored, silent coercion may occur. Elements returned order added.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Queue$push() Queue$get() Queue$pop() Queue$remove() Queue$empty() Queue$size() Queue$print() Queue$clone()","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-push-","dir":"Reference","previous_headings":"","what":"Method push()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Adds element(s) Queue.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$push(new_elements)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"new_elements vector elements add","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"self invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-get-","dir":"Reference","previous_headings":"","what":"Method get()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Returns contents Queue object.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$get()"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"single vector containing Queue contents","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-pop-","dir":"Reference","previous_headings":"","what":"Method pop()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Returns first (oldest) element Queue removes .","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$pop()"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"vector length 1 containing first element Queue NULL Queue empty","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-remove-","dir":"Reference","previous_headings":"","what":"Method remove()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Removes oldest occurrence specified element(s) Queue. Relies implicit type conversions R identify elements remove.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$remove(elements)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"elements vector elements remove Queue","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns-3","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"self invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-empty-","dir":"Reference","previous_headings":"","what":"Method empty()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Removes elements Queue.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$empty()"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns-4","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"self invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-size-","dir":"Reference","previous_headings":"","what":"Method size()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Returns number elements Queue.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$size()"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns-5","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"integer length 1","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"Prints Queue.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$print(...)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"... additional arguments method, ignored","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"returns-6","dir":"Reference","previous_headings":"","what":"Returns","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"invisibly self","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"objects class cloneable method.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"","code":"Queue$clone(deep = FALSE)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/Queue.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"R6 Class - A First-In-First-Out Abstract Data Type β€” Queue","text":"deep Whether make deep clone.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/reference/add_no_selected_choices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add empty choice to choices selected β€” add_no_selected_choices","text":"","code":"add_no_selected_choices(x, multiple = FALSE)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/add_no_selected_choices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add empty choice to choices selected β€” add_no_selected_choices","text":"x (choices_selected) output multiple (logical) whether multiple selections allowed ","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/reference/all_choices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An S3 structure representing the selection of all\npossible choices in a filter_spec, select_spec or choices_selected object. β€” all_choices","text":"","code":"all_choices()"},{"path":"https://insightsengineering.github.io/teal.transform/reference/all_choices.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"An S3 structure representing the selection of all\npossible choices in a filter_spec, select_spec or choices_selected object. β€” all_choices","text":"all_choices object","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/all_choices.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An S3 structure representing the selection of all\npossible choices in a filter_spec, select_spec or choices_selected object. β€” all_choices","text":"","code":"# Both structures are semantically identical filter_spec( vars = c(\"selected_variable\"), choices = c(\"value1\", \"value2\"), selected = c(\"value1\", \"value2\") ) #> filter_spec with delayed data: #> $ vars_choices #> [1] \"selected_variable\" #> $ vars_selected #> [1] \"selected_variable\" #> $ vars_label #> NULL #> $ vars_fixed #> [1] TRUE #> $ vars_multiple #> [1] TRUE #> $ choices #> [1] \"value1\" \"value2\" #> $ selected #> [1] \"value1\" \"value2\" #> $ label #> [1] \"Filter by\" #> $ multiple #> [1] TRUE #> $ fixed #> [1] FALSE #> $ sep #> [1] \" - \" #> $ drop_keys #> [1] FALSE #> $ dataname #> NULL #> $ initialized #> [1] FALSE filter_spec( vars = c(\"selected_variable\"), choices = c(\"value1\", \"value2\"), selected = all_choices() ) #> filter_spec with delayed data: #> $ vars_choices #> [1] \"selected_variable\" #> $ vars_selected #> [1] \"selected_variable\" #> $ vars_label #> NULL #> $ vars_fixed #> [1] TRUE #> $ vars_multiple #> [1] TRUE #> $ choices #> [1] \"value1\" \"value2\" #> $ selected #> [1] \"value1\" \"value2\" #> $ label #> [1] \"Filter by\" #> $ multiple #> [1] TRUE #> $ fixed #> [1] FALSE #> $ sep #> [1] \" - \" #> $ drop_keys #> [1] FALSE #> $ dataname #> NULL #> $ initialized #> [1] FALSE choices_selected(choices = letters, selected = letters) #> $choices #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $selected #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" choices_selected(choices = letters, selected = all_choices()) #> $choices #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $selected #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\""},{"path":"https://insightsengineering.github.io/teal.transform/reference/are_needed_keys_provided.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the provided slices have the corresponding join keys β€” are_needed_keys_provided","title":"Checks whether the provided slices have the corresponding join keys β€” are_needed_keys_provided","text":"Checks whether provided slices corresponding join keys","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/are_needed_keys_provided.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the provided slices have the corresponding join keys β€” are_needed_keys_provided","text":"","code":"are_needed_keys_provided(join_keys, merged_selector_list)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/are_needed_keys_provided.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the provided slices have the corresponding join keys β€” are_needed_keys_provided","text":"join_keys (JoinKeys) provided join keys merged_selector_list (list) specification datasets' slices merge","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/are_needed_keys_provided.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether the provided slices have the corresponding join keys β€” are_needed_keys_provided","text":"TRUE pairs slices corresponding keys; FALSE otherwise","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/are_needed_keys_provided.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Checks whether the provided slices have the corresponding join keys β€” are_needed_keys_provided","text":"merged_selector_list contains list descriptions data frame slices; coming single dataset. function checks whether pairs datasets join keys needed merge slices.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_check_parse_varname.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks varname argument and convert to call β€” call_check_parse_varname","title":"Checks varname argument and convert to call β€” call_check_parse_varname","text":"Checks varname type parse character","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_check_parse_varname.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks varname argument and convert to call β€” call_check_parse_varname","text":"","code":"call_check_parse_varname(varname)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_check_parse_varname.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks varname argument and convert to call β€” call_check_parse_varname","text":"varname (name, call character(1)) name variable","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_choice.html","id":null,"dir":"Reference","previous_headings":"","what":"Choices condition call β€” call_condition_choice","title":"Choices condition call β€” call_condition_choice","text":"Compose choices condition call inputs.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_choice.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choices condition call β€” call_condition_choice","text":"","code":"call_condition_choice(varname, choices)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_choice.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choices condition call β€” call_condition_choice","text":"varname (name, call character(1)) name variable choices (vector)varname values match using == (single value) %% (vector) condition. choices can vector type output might converted: factor call composed choices converted character Date call composed choices converted character using format(choices) POSIXct, POSIXlt Call composed choices converted character using format(choices). One careful formatted date-time variable might loose precision (see format argument format.POSIXlt) output call insufficient exact comparison. case one specify varname = trunc() possibly convert choices character)","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_choice.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choices condition call β€” call_condition_choice","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_choice.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Choices condition call β€” call_condition_choice","text":"","code":"teal.transform:::call_condition_choice(\"SEX\", choices = c(1, 2)) #> SEX %in% c(1, 2) teal.transform:::call_condition_choice(as.name(\"SEX\"), choices = \"F\") #> SEX == \"F\" teal.transform:::call_condition_choice(\"SEX\", choices = c(\"F\", \"M\")) #> SEX %in% c(\"F\", \"M\") teal.transform:::call_condition_choice(\"SEX\", choices = factor(c(\"F\", \"M\"))) #> SEX %in% c(\"F\", \"M\") teal.transform:::call_condition_choice(\"x$SEX\", choices = Sys.Date()) #> x$SEX == \"2023-08-14\" teal.transform:::call_condition_choice(\"trunc(x$SEX)\", choices = Sys.time()) #> trunc(x$SEX) == \"2023-08-14 13:42:26\""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_logical.html","id":null,"dir":"Reference","previous_headings":"","what":"logical variable condition call β€” call_condition_logical","title":"logical variable condition call β€” call_condition_logical","text":"Compose logical variable condition call inputs","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_logical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"logical variable condition call β€” call_condition_logical","text":"","code":"call_condition_logical(varname, choice)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_logical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"logical variable condition call β€” call_condition_logical","text":"varname (name character(1)) name variable choice (logical(1)) chosen value","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_logical.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"logical variable condition call β€” call_condition_logical","text":"call call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_logical.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"logical variable condition call β€” call_condition_logical","text":"","code":"teal.transform:::call_condition_logical(\"event\", choice = TRUE) #> event teal.transform:::call_condition_logical(\"event\", choice = FALSE) #> !event"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range.html","id":null,"dir":"Reference","previous_headings":"","what":"numeric range condition call β€” call_condition_range","title":"numeric range condition call β€” call_condition_range","text":"Compose numeric range condition call inputs","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"numeric range condition call β€” call_condition_range","text":"","code":"call_condition_range(varname, range)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"numeric range condition call β€” call_condition_range","text":"varname (name character(1)) name variable range (numeric(2)) range variable","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"numeric range condition call β€” call_condition_range","text":"call call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"numeric range condition call β€” call_condition_range","text":"","code":"teal.transform:::call_condition_range(\"AGE\", range = c(1, 2)) #> AGE >= 1 & AGE <= 2 teal.transform:::call_condition_range(as.name(\"AGE\"), range = c(-1.2, 2.1)) #> AGE >= -1.2 & AGE <= 2.1 teal.transform:::call_condition_range( teal.transform:::call_extract_list(\"ADSL\", \"AGE\"), range = c(-1.2, 2.1) ) #> ADSL$AGE >= -1.2 & ADSL$AGE <= 2.1"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_date.html","id":null,"dir":"Reference","previous_headings":"","what":"Date range condition call β€” call_condition_range_date","title":"Date range condition call β€” call_condition_range_date","text":"Compose Date range condition call inputs","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Date range condition call β€” call_condition_range_date","text":"","code":"call_condition_range_date(varname, range)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Date range condition call β€” call_condition_range_date","text":"varname (name character(1)) name variable range (Date) range variable","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Date range condition call β€” call_condition_range_date","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_date.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Date range condition call β€” call_condition_range_date","text":"","code":"teal.transform:::call_condition_range_date( as.name(\"date\"), range = c(Sys.Date(), Sys.Date() + 1) ) #> date >= as.Date(\"2023-08-14\") & date <= as.Date(\"2023-08-15\")"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_posixct.html","id":null,"dir":"Reference","previous_headings":"","what":"POSIXct range condition call β€” call_condition_range_posixct","title":"POSIXct range condition call β€” call_condition_range_posixct","text":"Compose POSIXct range condition call inputs.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_posixct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"POSIXct range condition call β€” call_condition_range_posixct","text":"","code":"call_condition_range_posixct(varname, range, timezone = Sys.timezone())"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_posixct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"POSIXct range condition call β€” call_condition_range_posixct","text":"varname (name character(1)) name variable range (POSIXct) range variable. aware output uses truncated range format \"%Y-%m-%d %H:%M:%S\", means precision might lost. timezone (character(1)) specifies time zone used conversion. default Sys.timezone() used.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_posixct.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"POSIXct range condition call β€” call_condition_range_posixct","text":"call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_condition_range_posixct.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"POSIXct range condition call β€” call_condition_range_posixct","text":"","code":"teal.transform:::call_condition_range_posixct( varname = as.name(\"datetime\"), range = c(Sys.time(), Sys.time() + 1), timezone = \"UTC\" ) #> datetime >= as.POSIXct(\"2023-08-14 13:42:27\", tz = \"UTC\") & datetime < #> as.POSIXct(\"2023-08-14 13:42:29\", tz = \"UTC\")"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_array.html","id":null,"dir":"Reference","previous_headings":"","what":"Get call to subset and select array β€” call_extract_array","title":"Get call to subset and select array β€” call_extract_array","text":"Get call subset select array","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_array.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get call to subset and select array β€” call_extract_array","text":"","code":"call_extract_array(dataname = \".\", row = NULL, column = NULL, aisle = NULL)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_array.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get call to subset and select array β€” call_extract_array","text":"dataname (character(1) name) row (name, call, logical, integer, character) optional, name row condition column (name, call, logical, integer, character) optional, name column condition aisle (name, call, logical, integer, character) optional, name row condition","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_array.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get call to subset and select array β€” call_extract_array","text":"[ call conditions included specific Extract call 3-dimensional array","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_array.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get call to subset and select array β€” call_extract_array","text":"","code":"teal.transform:::call_extract_array( dataname = \"my_array\", row = teal.transform:::call_condition_choice(\"my_array$SEX\", \"M\"), column = call(\"c\", \"SEX\", \"AGE\"), aisle = \"RNAseq_rnaaccess\" ) #> my_array[my_array$SEX == \"M\", c(\"SEX\", \"AGE\"), \"RNAseq_rnaaccess\"] teal.transform:::call_extract_array( \"mae_object\", column = teal.transform:::call_condition_choice(\"SEX\", \"M\") ) #> mae_object[, SEX == \"M\", ]"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Compose extract call with $ operator β€” call_extract_list","title":"Compose extract call with $ operator β€” call_extract_list","text":"Compose extract call $ operator","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compose extract call with $ operator β€” call_extract_list","text":"","code":"call_extract_list(dataname, varname, dollar = TRUE)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compose extract call with $ operator β€” call_extract_list","text":"dataname (character(1) name) name object varname (character(1) name) name slot data dollar (logical(1)) whether returned call use $ [[ operator","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compose extract call with $ operator β€” call_extract_list","text":"$ [[ call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compose extract call with $ operator β€” call_extract_list","text":"","code":"teal.transform:::call_extract_list(\"ADSL\", \"SEX\") #> ADSL$SEX teal.transform:::call_extract_list(\"ADSL\", \"named element\") #> ADSL$\"named element\" teal.transform:::call_extract_list(as.name(\"ADSL\"), as.name(\"AGE\")) #> ADSL$AGE teal.transform:::call_extract_list(as.name(\"weird name\"), as.name(\"AGE\")) #> `weird name`$AGE teal.transform:::call_extract_list(as.name(\"ADSL\"), \"AGE\", dollar = FALSE) #> ADSL[[\"AGE\"]]"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Get call to subset and select matrix β€” call_extract_matrix","title":"Get call to subset and select matrix β€” call_extract_matrix","text":"Get call subset select matrix","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get call to subset and select matrix β€” call_extract_matrix","text":"","code":"call_extract_matrix(dataname = \".\", row = NULL, column = NULL)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get call to subset and select matrix β€” call_extract_matrix","text":"dataname (character(1) name) row (name, call, logical, integer, character) optional, name row condition column (name, call, logical, integer, character) optional, name column condition","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get call to subset and select matrix β€” call_extract_matrix","text":"[ call conditions included specific Extract call matrix","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_extract_matrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get call to subset and select matrix β€” call_extract_matrix","text":"","code":"teal.transform:::call_extract_matrix( dataname = \"my_array\", row = teal.transform:::call_condition_choice(\"my_array$SEX\", \"M\"), column = call(\"c\", \"SEX\", \"AGE\") ) #> my_array[my_array$SEX == \"M\", c(\"SEX\", \"AGE\")] teal.transform:::call_extract_matrix( \"mae_object\", column = teal.transform:::call_condition_choice(\"SEX\", \"M\") ) #> mae_object[, SEX == \"M\"]"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_with_colon.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a call using a function in a given namespace β€” call_with_colon","title":"Create a call using a function in a given namespace β€” call_with_colon","text":"arguments ... need quoted evaluated otherwise","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_with_colon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a call using a function in a given namespace β€” call_with_colon","text":"","code":"call_with_colon(name, ..., unlist_args = list())"},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_with_colon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a call using a function in a given namespace β€” call_with_colon","text":"name character function name, possibly using namespace colon ::, also works ::: (sometimes needed, strongly discouraged) ... arguments pass function name name unlist_args list extra arguments passed single list, avoids use .call function","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/call_with_colon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a call using a function in a given namespace β€” call_with_colon","text":"","code":"print_call_and_eval <- function(x) { eval(print(x)) } print_call_and_eval( teal.transform:::call_with_colon(\"glue::glue\", \"x = {x}\", x = 10) ) #> glue::glue(\"x = {x}\", x = 10) #> x = 10 if (FALSE) { # mtcars$cyl evaluated print_call_and_eval( teal.transform:::call_with_colon(\"dplyr::filter\", as.name(\"mtcars\"), mtcars$cyl == 6) ) # mtcars$cyl argument not evaluated immediately (in call expression) print_call_and_eval( teal.transform:::call_with_colon(\"dplyr::filter\", as.name(\"mtcars\"), quote(cyl == 6)) ) # does not work because argument is evaluated and the # non-dplyr filter does not look inside mtcars # cannot eval because it does not pass checks because of non-standard evaluation call(\"filter\", as.name(\"mtcars\"), quote(cyl == 6)) # works, but non-dplyr filter is taken call(\"filter\", as.name(\"mtcars\"), mtcars$cyl == 6) nb_args <- function(...) nargs() print_call_and_eval( teal.transform:::call_with_colon(\"nb_args\", arg1 = 1, unlist_args = list(arg2 = 2, args3 = 3)) ) # duplicate arguments print_call_and_eval( teal.transform:::call_with_colon(\"nb_args\", arg1 = 1, unlist_args = list(arg2 = 2, args2 = 2)) ) }"},{"path":"https://insightsengineering.github.io/teal.transform/reference/calls_combine_by.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine calls by operator β€” calls_combine_by","title":"Combine calls by operator β€” calls_combine_by","text":"Combine list calls specific operator","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/calls_combine_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine calls by operator β€” calls_combine_by","text":"","code":"calls_combine_by(operator, calls)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/calls_combine_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine calls by operator β€” calls_combine_by","text":"operator (character(1) name) name/symbol operator. calls (list calls) list containing calls combined operator","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/calls_combine_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine calls by operator β€” calls_combine_by","text":"call combined call","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/calls_combine_by.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine calls by operator β€” calls_combine_by","text":"","code":"teal.transform:::calls_combine_by( \"&\", calls = list( teal.transform:::call_condition_choice(\"SEX\", \"F\"), teal.transform:::call_condition_range(\"AGE\", c(20, 50)), teal.transform:::call_condition_choice(\"ARM\", \"ARM: A\"), TRUE ) ) #> SEX == \"F\" & (AGE >= 20 & AGE <= 50) & ARM == \"ARM: A\" & TRUE"},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_extract_spec_react.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to check data_extract_specs β€” check_data_extract_spec_react","title":"Function to check data_extract_specs β€” check_data_extract_spec_react","text":"Checks dataname argument exists dataset. Checks selected filter columns exist within datasets. Throws shiny validation error requirements met.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_extract_spec_react.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to check data_extract_specs β€” check_data_extract_spec_react","text":"","code":"check_data_extract_spec_react(datasets, data_extract)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_extract_spec_react.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to check data_extract_specs β€” check_data_extract_spec_react","text":"datasets (FilteredData) object created using teal API data_extract (list) output data_extract module","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_extract_spec_react.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to check data_extract_specs β€” check_data_extract_spec_react","text":"NULL","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_merge_selectors.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate data_extracts in merge_datasets β€” check_data_merge_selectors","title":"Validate data_extracts in merge_datasets β€” check_data_merge_selectors","text":"Validate selected inputs data_extract passing data_merge avoid dplyr errors unexpected results","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_merge_selectors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate data_extracts in merge_datasets β€” check_data_merge_selectors","text":"","code":"check_data_merge_selectors(selector_list)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_merge_selectors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate data_extracts in merge_datasets β€” check_data_merge_selectors","text":"selector_list (reactive) output data_extract_multiple_srv() reactive named list outputs data_extract_srv(). using reactive named list, names must identical shiny ids respective data_extract_ui().","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_data_merge_selectors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate data_extracts in merge_datasets β€” check_data_merge_selectors","text":"NULL check successful","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_no_multiple_selection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks that the extract_input specification does not allow multiple\nselection β€” check_no_multiple_selection","text":"","code":"check_no_multiple_selection(extract_input)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/check_no_multiple_selection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks that the extract_input specification does not allow multiple\nselection β€” check_no_multiple_selection","text":"extract_input data_extract_spec list data_extract_spec NULL Stops condition met","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_labeled.html","id":null,"dir":"Reference","previous_headings":"","what":"Set ","title":"Set ","text":"often useful choices_selected marks drop-boxes shiny::selectInput().","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_labeled.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set ","text":"","code":"choices_labeled(choices, labels, subset = NULL, types = NULL) # S3 method for choices_labeled print(x, ...)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_labeled.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set ","text":"choices character / factor / numeric / logical vector. labels character vector containing labels applied choices. NA \"Label Missing\" used. subset vector subset choices. useful variables need named. argument used, returned vector match order. types Character vector containing types columns used applying appropriate icons choices_selected drop box. (e.g. \"numeric\") x object used select method. ... arguments passed methods.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_labeled.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set ","text":"named character vector","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_labeled.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set ","text":"either choices labels factors, coerced character. Duplicated elements choices get removed.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_labeled.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set ","text":"","code":"library(shiny) ADSL <- teal.transform::rADSL ADTTE <- teal.transform::rADTTE choices1 <- choices_labeled(names(ADSL), teal.data::col_labels(ADSL, fill = FALSE)) choices2 <- choices_labeled(ADTTE$PARAMCD, ADTTE$PARAM) # if only a subset of variables are needed, use subset argument choices3 <- choices_labeled( names(ADSL), teal.data::col_labels(ADSL, fill = FALSE), subset = c(\"ARMCD\", \"ARM\") ) if (FALSE) { shinyApp( ui = fluidPage( selectInput(\"c1\", label = \"Choices from ADSL\", choices = choices1, selected = choices1[1] ), selectInput(\"c2\", label = \"Choices from ADTTE\", choices = choices2, selected = choices2[1] ), selectInput(\"c3\", label = \"Arm choices from ADSL\", choices = choices3, selected = choices3[1] ) ), server = function(input, output) {} ) }"},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_selected.html","id":null,"dir":"Reference","previous_headings":"","what":"Choices Selected β€” choices_selected","title":"Choices Selected β€” choices_selected","text":"Construct single list containing available choices, default selected value, additional settings order choices selected elements appearing first whether block user making selections. Can used ui input elements teal.widgets::optionalSelectInput()","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_selected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choices Selected β€” choices_selected","text":"","code":"choices_selected( choices, selected = if (inherits(choices, \"delayed_data\")) NULL else choices[1], keep_order = FALSE, fixed = FALSE ) is.choices_selected(x)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_selected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choices Selected β€” choices_selected","text":"choices (character) vector possible choices delayed_data object See variable_choices() value_choices(). selected (character) vector preselected options, (all_choices) object (delayed_data) object. delayed_data object choices must also delayed_data object. supplied default first element choices choices vector, NULL choices delayed_data object. keep_order (logical) case FALSE selected variables top drop-field. fixed optional, (logical) Whether block user select choices x object check","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_selected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choices Selected β€” choices_selected","text":"Object class choices_selected type list contains specified choices, selected, keep_order fixed.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_selected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Choices Selected β€” choices_selected","text":"Please note order selected always follow order choices. keep_order argument set false run following code inside: choices <- c(selected, setdiff(choices, selected)) case want keep specific order choices, set keep_order TRUE.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/choices_selected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Choices Selected β€” choices_selected","text":"","code":"library(shiny) # all_choices example - semantically the same objects choices_selected(choices = letters, selected = all_choices()) #> $choices #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $selected #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" choices_selected(choices = letters, selected = letters) #> $choices #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $selected #> [1] \"a\" \"b\" \"c\" \"d\" \"e\" \"f\" \"g\" \"h\" \"i\" \"j\" \"k\" \"l\" \"m\" \"n\" \"o\" \"p\" \"q\" \"r\" \"s\" #> [20] \"t\" \"u\" \"v\" \"w\" \"x\" \"y\" \"z\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" choices_selected( choices = stats::setNames(LETTERS[1:5], paste(\"Letter\", LETTERS[1:5])), selected = \"C\" ) #> $choices #> Letter C Letter A Letter B Letter D Letter E #> \"C\" \"A\" \"B\" \"D\" \"E\" #> #> $selected #> [1] \"C\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" ADSL <- teal.transform::rADSL choices_selected(variable_choices(ADSL), \"SEX\") #> $choices #> number of choices: 55 #> #> SEX: Sex #> STUDYID: Study Identifier #> USUBJID: Unique Subject Identifier #> SUBJID: Subject Identifier for the Study #> SITEID: Study Site Identifier #> AGE: Age #> AGEU: Age Units #> RACE: Race #> ETHNIC: Ethnicity #> COUNTRY: Country #> DTHFL: Subject Death Flag #> INVID: Investigator Identifier #> INVNAM: Investigator Name #> ARM: Description of Planned Arm #> ARMCD: Planned Arm Code #> ACTARM: Description of Actual Arm #> ACTARMCD: Actual Arm Code #> TRT01P: Planned Treatment for Period 01 #> TRT01A: Actual Treatment for Period 01 #> TRT02P: Planned Treatment for Period 02 #> TRT02A: Actual Treatment for Period 02 #> REGION1: Geographic Region 1 #> STRATA1: Stratification Factor 1 #> STRATA2: Stratification Factor 2 #> BMRKR1: Continuous Level Biomarker 1 #> BMRKR2: Categorical Level Biomarker 2 #> ITTFL: Intent-To-Treat Population Flag #> SAFFL: Safety Population Flag #> BMEASIFL: Response Evaluable Population Flag #> BEP01FL: Biomarker Evaluable Population Flag #> AEWITHFL: AE Leading to Drug Withdrawal Flag #> RANDDT: Date of Randomization #> TRTSDTM: Datetime of First Exposure to Treatment #> TRTEDTM: Datetime of Last Exposure to Treatment #> TRT01SDTM: Datetime of First Exposure to Treatment in Period 01 #> TRT01EDTM: Datetime of Last Exposure in Period 01 #> TRT02SDTM: Datetime of First Exposure to Treatment in Period 02 #> TRT02EDTM: Datetime of Last Exposure to Treatment in Period 02 #> AP01SDTM: Period 01 Start Datetime #> AP01EDTM: Period 01 End Datetime #> AP02SDTM: Period 02 Start Datetime #> AP02EDTM: Period 02 End Datetime #> EOSSTT: End of Study Status #> EOTSTT: End of Treatment Status #> EOSDT: End of Study Date #> EOSDY: End of Study Relative Day #> DCSREAS: Reason for Discontinuation from Study #> DTHDT: Date of Death #> DTHCAUS: Cause of Death #> DTHCAT: Cause of Death Category #> LDDTHELD: Elapsed Days from Last Dose to Death #> LDDTHGR1: Last Dose to Death - Days Elapsed Grp 1 #> LSTALVDT: Date Last Known Alive #> DTHADY: Relative Day of Death #> ADTHAUT: Autopsy Performed #> #> #> $selected #> [1] \"SEX\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" # How to select nothing # use an empty character choices_selected( choices = c(\"\", \"A\", \"B\", \"C\"), selected = \"\" ) #> $choices #> [1] \"\" \"A\" \"B\" \"C\" #> #> $selected #> [1] \"\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" # How to allow the user to select nothing # use an empty character choices_selected( choices = c(\"A\", \"\", \"B\", \"C\"), selected = \"A\" ) #> $choices #> [1] \"A\" \"\" \"B\" \"C\" #> #> $selected #> [1] \"A\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" # How to make Nothing the Xth choice # just use keep_order choices_selected( choices = c(\"A\", \"\", \"B\", \"C\"), selected = \"A\", keep_order = TRUE ) #> $choices #> [1] \"A\" \"\" \"B\" \"C\" #> #> $selected #> [1] \"A\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" # How to give labels to selections # by adding names - choices will be replaced by \"name\" in UI, not in code choices_selected( choices = c(\"name for A\" = \"A\", \"Name for nothing\" = \"\", \"name for b\" = \"B\", \"name for C\" = \"C\"), selected = \"A\" ) #> $choices #> name for A Name for nothing name for b name for C #> \"A\" \"\" \"B\" \"C\" #> #> $selected #> [1] \"A\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" # by using choices_labeled # labels will be shown behind the choice choices_selected( choices = choices_labeled( c(\"A\", \"\", \"B\", \"C\"), c(\"name for A\", \"nothing\", \"name for B\", \"name for C\") ), selected = \"A\" ) #> $choices #> number of choices: 4 #> #> A: name for A #> : nothing #> B: name for B #> C: name for C #> #> #> $selected #> [1] \"A\" #> #> $fixed #> [1] FALSE #> #> attr(,\"class\") #> [1] \"choices_selected\" # Passing a `delayed_data` object to `selected` choices_selected( choices = variable_choices(\"ADSL\"), selected = variable_choices(\"ADSL\", subset = c(\"STUDYID\")) ) #> choices_selected with delayed data: ADSL #> $ choices #> variable_choices with delayed data: ADSL #> $ data #> [1] \"ADSL\" #> $ subset #> NULL #> $ key #> NULL #> $ selected #> variable_choices with delayed data: ADSL #> $ data #> [1] \"ADSL\" #> $ subset #> [1] \"STUDYID\" #> $ key #> NULL #> $ keep_order #> [1] FALSE #> $ fixed #> [1] FALSE # functional form (subsetting for factor variables only) of choices_selected # with delayed data loading choices_selected(variable_choices(\"ADSL\", subset = function(data) { idx <- vapply(data, is.factor, logical(1)) return(names(data)[idx]) })) #> choices_selected with delayed data: ADSL #> $ choices #> variable_choices with delayed data: ADSL #> $ data #> [1] \"ADSL\" #> $ subset #> function(data) { #> idx <- vapply(data, is.factor, logical(1)) #> return(names(data)[idx]) #> } #> #> $ key #> NULL #> $ selected #> NULL #> $ keep_order #> [1] FALSE #> $ fixed #> [1] FALSE cs <- choices_selected( choices = c(\"A\", \"B\", \"C\"), selected = \"A\" ) ui <- fluidPage( teal.widgets::optionalSelectInput( inputId = \"id\", choices = cs$choices, selected = cs$selected ) ) if (FALSE) { shinyApp(ui, server = function(input, output, session) {}) }"},{"path":"https://insightsengineering.github.io/teal.transform/reference/compose_and_enable_validators.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to compose validators from data_extract_multiple_srv β€” compose_and_enable_validators","title":"Function to compose validators from data_extract_multiple_srv β€” compose_and_enable_validators","text":"function takes output data_extract_multiple_srv collates shinyvalidate::InputValidators returned single validator enables ","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/compose_and_enable_validators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to compose validators from data_extract_multiple_srv β€” compose_and_enable_validators","text":"","code":"compose_and_enable_validators(iv, selector_list, validator_names = NULL)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/compose_and_enable_validators.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to compose validators from data_extract_multiple_srv β€” compose_and_enable_validators","text":"iv (shinyvalidate::InputValidator) validator. selector_list (reactive named list reactives). Typically output data_extract_multiple_srv. validators list (specifically selector_list()[[validator_names]]()iv) added iv. validator_names (character NULL). character validators elements selector_list() whose name list added. NULL validators added","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/compose_and_enable_validators.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to compose validators from data_extract_multiple_srv β€” compose_and_enable_validators","text":"(shinyvalidate::InputValidator) enabled iv appropriate validators added .","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/compose_and_enable_validators.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to compose validators from data_extract_multiple_srv β€” compose_and_enable_validators","text":"","code":"library(shiny) library(shinyvalidate) library(shinyjs) #> #> Attaching package: β€˜shinyjs’ #> The following object is masked from β€˜package:shiny’: #> #> runExample #> The following objects are masked from β€˜package:methods’: #> #> removeClass, show library(teal.widgets) iris_extract <- data_extract_spec( dataname = \"iris\", select = select_spec( label = \"Select variable:\", choices = variable_choices(iris, colnames(iris)), selected = \"Sepal.Length\", multiple = TRUE, fixed = FALSE ) ) data_list <- list(iris = reactive(iris)) app <- shinyApp( ui = fluidPage( useShinyjs(), standard_layout( output = verbatimTextOutput(\"out1\"), encoding = tagList( data_extract_ui( id = \"x_var\", label = \"Please select an X column\", data_extract_spec = iris_extract ), data_extract_ui( id = \"y_var\", label = \"Please select a Y column\", data_extract_spec = iris_extract ), data_extract_ui( id = \"col_var\", label = \"Please select a color column\", data_extract_spec = iris_extract ) ) ) ), server = function(input, output, session) { exactly_2_validation <- function() { ~ if (length(.) != 2) \"Exactly 2 'Y' column variables must be chosen\" } selector_list <- data_extract_multiple_srv( list(x_var = iris_extract, y_var = iris_extract, col_var = iris_extract), datasets = data_list, select_validation_rule = list( x_var = sv_required(\"Please select an X column\"), y_var = compose_rules( sv_required(\"Exactly 2 'Y' column variables must be chosen\"), exactly_2_validation() ) ) ) iv_r <- reactive({ iv <- InputValidator$new() compose_and_enable_validators( iv, selector_list, # if validator_names = NULL then all validators are used # to turn on only \"x_var\" then set this argument to \"x_var\" validator_names = NULL ) }) output$out1 <- renderPrint({ if (iv_r()$is_valid()) { ans <- lapply(selector_list(), function(x) { cat(format_data_extract(x()), \"\\n\\n\") }) } else { \"Check that you have made a valid selection\" } }) } ) if (interactive()) { runApp(app) }"},{"path":"https://insightsengineering.github.io/teal.transform/reference/cond_data_extract_single_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates a panel that displays (with filter and column selection)\nconditionally on input[ns(","title":"Creates a panel that displays (with filter and column selection)\nconditionally on input[ns(","text":"Creates panel displays (filter column selection) conditionally input[ns(\"dataset\")] == dataname.","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/cond_data_extract_single_ui.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates a panel that displays (with filter and column selection)\nconditionally on input[ns(","text":"","code":"cond_data_extract_single_ui(ns, single_data_extract_spec)"},{"path":"https://insightsengineering.github.io/teal.transform/reference/cond_data_extract_single_ui.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates a panel that displays (with filter and column selection)\nconditionally on input[ns(","text":"ns (function) shiny namespace function single_data_extract_spec (data_extract_spec) specification extraction data application initialization. Generated data_extract_spec().","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/cond_data_extract_single_ui.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates a panel that displays (with filter and column selection)\nconditionally on input[ns(","text":"(shiny.tag) Shiny tag HTML code panel","code":""},{"path":"https://insightsengineering.github.io/teal.transform/reference/cond_data_extract_single_ui.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates a panel that displays (with filter and column selection)\nconditionally on input[ns(","text":"","code":"teal.transform:::cond_data_extract_single_ui( shiny::NS(\"TEST\"), data_extract_spec(dataname = \"test\") ) #>
#>
#>
#>
#>
#>