This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Demonstrate numeric filtering behavior | |
| numeric_demo <- teal::init( | |
| data = demo_data, | |
| modules = teal::modules( | |
| tm_g_scatterplot( | |
| label = "Age vs BMI", | |
| dataname = "ADSL", | |
| x = data_extract_spec( | |
| dataname = "ADSL", | |
| select = select_spec( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Demonstrate categorical filtering behavior | |
| categorical_demo <- teal::init( | |
| data = demo_data, | |
| modules = teal::modules( | |
| tm_variable_browser( | |
| label = "Variable Browser", | |
| dataname = "ADSL" | |
| ), | |
| tm_g_distribution( | |
| label = "Treatment Distribution", | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | library(teal) | |
| library(teal.modules.general) | |
| library(teal.data) | |
| library(pharmaverseadam) | |
| # Load data to demonstrate filter panel structure | |
| data("adsl", package = "pharmaverseadam") | |
| data("adae", package = "pharmaverseadam") | |
| # Create teal_data object | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Advanced select_spec options | |
| select_spec( | |
| choices = variable_choices("ADSL", c("AGE", "BMIBL")), | |
| selected = "AGE", | |
| multiple = TRUE, # Allow multiple variable selection | |
| fixed = TRUE, # Prevent user from changing selection | |
| always_selected = "AGE" # Keep AGE always selected | |
| ) | |
| # Advanced filter_spec options | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Example 3: Both select_spec and filter_spec - Full control | |
| app_select_and_filter <- teal::init( | |
| data = demo_data, | |
| modules = teal::modules( | |
| tm_g_scatterplot( | |
| label = "Example 3: Select + Filter Specs", | |
| dataname = "ADSL", | |
| x = data_extract_spec( | |
| dataname = "ADSL", | |
| select = select_spec( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Example 2: Only filter_spec - Row filtering only | |
| app_filter_only <- teal::init( | |
| data = demo_data, | |
| modules = teal::modules( | |
| tm_g_scatterplot( | |
| label = "Example 2: Filter Spec Only", | |
| dataname = "ADSL", | |
| x = data_extract_spec( | |
| dataname = "ADSL", | |
| select = select_spec( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | library(teal) | |
| library(teal.modules.general) | |
| library(teal.data) | |
| library(pharmaverseadam) | |
| # Load data | |
| data("adsl", package = "pharmaverseadam") | |
| # Create teal_data object | |
| demo_data <- teal_data() | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Dataset → data_extract_spec → Module Processing → User Interface → Analysis Output | |
| ↓ ↓ ↓ ↓ ↓ | |
| Raw Data → Column Selection → Row Filtering → UI Controls → Final Analysis | |
| → Variable Choices → Data Subset → User Options → Processed Results | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Pattern 1: Domain-based nesting | |
| modules( | |
| label = "Safety Domain", | |
| modules(label = "Overview", ...), | |
| modules(label = "Detailed Analysis", ...), | |
| modules(label = "Regulatory Tables", ...) | |
| ) | |
| # Pattern 2: Analysis-type nesting | |
| modules( | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | library(teal) | |
| library(teal.modules.general) | |
| library(teal.data) | |
| library(pharmaverseadam) | |
| # Step 1: Load multiple ADaM datasets | |
| data("adsl", package = "pharmaverseadam") | |
| data("adae", package = "pharmaverseadam") | |
| data("adlb", package = "pharmaverseadam") |