A modular web-based training platform for transitioning from SAS to R programming in data analysis and clinical research
beginR is a comprehensive Flask-based training portal that provides structured, progressive learning modules for data professionals transitioning from SAS to R. The platform emphasizes practical skills development through hands-on exercises, GitHub Copilot integration, and real-world data manipulation scenarios including SDTM programming and quality control procedures.
- Modular: 7 progressive learning modules from RStudio setup to advanced QC and reporting
- Interactive: Progress tracking, downloadable resources, and hands-on exercises
- AI-Enhanced: GitHub Copilot integration throughout the curriculum
- Practical: Real-world data manipulation, SDTM creation, and professional reporting workflows
- Version: 1.2.0 (stable)
- Status: ✅ Production-ready for training programs and self-study
- Scope: Complete SAS-to-R transition curriculum with 7 structured modules
- Latest Updates: Enhanced UI, improved server stability, automatic logging, CI/CD integration
- Metadata-driven learning: Module configuration in Python dictionaries with flexible content management
- Progressive curriculum: RStudio setup → data manipulation → joins → dates/text → functions → SDTM → QC/reporting
- Resource management: Downloadable exercises, solutions, templates, and reference materials with organized bonus content
- Progress persistence: localStorage-based tracking across sessions with visual progress indicators and completion animations
- Theme support: Light/dark mode with CSS variables and user preference persistence
- Certificate generation: Automatic PDF certificate generation with completion logging to file-based storage
- Contact system: Secure contact form with file-based message storage (no email dependencies)
- Enhanced UI: Improved alignment, bigger interactive elements, and better visual feedback
- CI/CD Integration: GitHub Actions workflows with automated testing, formatting, and trusted contributor auto-merge
- Responsive design: Mobile-first Bootstrap 5 implementation with cross-device compatibility
git clone https://github.com/chiara-cattani/beginR.git
cd beginR
pip install -r requirements.txtRequirements: Python ≥ 3.8. Dependencies include Flask, Jinja2, Werkzeug.
Optional: python-dotenv for environment variable management.
For R exercises: R ≥ 4.0, RStudio recommended.
Required R packages: dplyr, lubridate, stringr, haven, gt, sdtm.oak.
install.packages(c("dplyr", "lubridate", "stringr", "haven", "gt", "remotes"))
remotes::install_github("pharmaverse/sdtm.oak")beginR/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies (production)
├── LICENSE # MIT License
├── README.md # Project documentation
│
├── config/ # Configuration files
│ ├── linting/ # Code quality tools
│ │ ├── .flake8 # Python linting
│ │ ├── .isort.cfg # Import sorting
│ │ └── ... # Other linting configs
│ ├── pytest.ini # Testing configuration
│ ├── requirements-dev.txt # Development dependencies
│ ├── requirements-test.txt # Testing dependencies
│ ├── Procfile # Heroku deployment
│ └── runtime.txt # Python runtime version
│
├── scripts/ # Startup scripts
│ ├── start_server.py # Robust cross-platform startup
│ ├── start_app.bat # Windows startup
│ └── start_app.sh # Unix/Linux startup
│
├── static/ # Frontend assets
│ ├── css/ # Stylesheets
│ │ ├── styles.css # Main styles
│ │ └── dark-theme.css # Dark mode styles
│ └── js/ # JavaScript
│ ├── main.js # Main application logic
│ └── theme-auto.js # Theme management
│
├── templates/ # Jinja2 HTML templates
├── training_material/ # R learning modules (theory, exercises, solutions)
├── bonus_resources/ # Additional reference materials
├── data/ # Application data (contacts, ratings)
├── tests/ # Test suite
└── docs/ # Extended documentation
Launch the application using one of these methods:
# Direct startup (recommended)
python app.py
# Robust server startup with auto-restart
python scripts/start_server.py
# Platform-specific scripts
scripts/start_app.bat # Windows
./scripts/start_app.sh # Unix/LinuxAccess the training portal at http://localhost:5000
- Start with Module 1: RStudio setup and environment configuration
- Progress sequentially: Each module builds on previous concepts
- Use progress tracking: Check off learning objectives as you complete them
- Download resources: Access exercises, solutions, and reference materials
- Practice with examples: Work through hands-on coding exercises in RStudio
| Module | Topic | Key Skills |
|---|---|---|
| 1 | RStudio & Environment Setup | Installation, environment configuration, GitHub Copilot basics |
| 2 | Data Manipulation Basics | dplyr fundamentals, tibbles, data types, SAS comparison |
| 3 | Joins & Summaries | left_join, group_by, summarise, frequency tables |
| 4 | Date & Text Handling | lubridate functions, stringr operations, study day calculations |
| 5 | Functions & Macro Translation | Custom R functions, SAS macro conversion, purrr iteration |
| 6 | SDTM Programming | sdtm.oak domains, metadata reading, XPT export |
| 7 | QC & Reporting | ISO8601 formatting, double-programming QC, gt tables |
All bonus materials are organized in the bonus_resources/ folder:
| Resource | Description | Module Coverage |
|---|---|---|
sas_to_r_cheatsheet.pdf |
SAS→R syntax mapping with practical examples | All modules |
copilot_prompt_library.pdf |
GitHub Copilot prompt templates and best practices | All modules |
report_template.Rmd |
Professional RMarkdown template for analysis reports | Module 7 |
data_manipulation_examples.R |
dplyr operations and data wrangling techniques | Modules 2-3 |
date_text_functions.R |
lubridate and stringr practical implementations | Module 4 |
custom_functions_library.R |
Reusable R functions and SAS macro translations | Module 5 |
sdtm_programming_guide.R |
SDTM domain creation with sdtm.oak package | Module 6 |
qc_validation_toolkit.R |
Quality control procedures and validation methods | Module 7 |
• app.py — Flask application with routing and module configuration
• requirements.txt — Python dependencies for production
• templates/ — Jinja2 HTML templates with inheritance structure
• static/css/styles.css — CSS variables, responsive design, and theming
• static/js/main.js — Progress tracking, theme toggle, and interactivity
• training_material/ — Structured learning content organized by module
• bonus_resources/ — Downloadable reference materials and templates
• config/ — Development tools, testing, and deployment configuration
• scripts/ — Server startup scripts for various platforms
- Fork the repository
- Create a feature branch for your changes
- Follow coding standards and submit a pull request with clear description
- For detailed development setup, see CI-CD.md
- Enhanced progress analytics — detailed learning analytics and completion reports
- Interactive coding exercises — in-browser R code execution and validation
- Video integration — embedded tutorial videos for complex concepts
- Community features — discussion forums and peer collaboration tools
- Assessment modules — quizzes and practical evaluations for each module
- Certification pathway — formal completion certificates and skills verification
- R for Data Science — Comprehensive R programming resource
- dplyr documentation — Data manipulation reference
- CDISC SDTM Implementation Guide — Clinical data standards
- GitHub Copilot Documentation — AI programming assistance
Cattani, C. (2025). beginR: Modular Web-Based Training Platform for SAS-to-R Transition. Web application version 1.0.0. https://github.com/chiara-cattani/beginR
This project is licensed under the MIT License — see the LICENSE file for details.