UBC Department of Pathology & Laboratory Medicine  · 

Data Science for
Healthcare Using R

Master R programming, tidyverse data wrangling, ggplot2 visualization, statistical analysis, and cutting-edge agentic AI with Claude — all in a healthcare context. No prior coding experience required.

10
Weeks
60
Hours
lab_analytics.R
# Agentic analytics: R meets Claude
library(tidyverse)
library(httr2)

# Load your lab dataset
lab_data <- read_csv("troponin_results.csv")

# Build a tidy summary
summary_tbl <- lab_data |>
  group_by(department) |>
  summarise(
    n = n(),
    pct_pos = mean(result > 52) * 100
  )

# Ask Claude to interpret the findings
insight <- claude_analyze(
  data = summary_tbl,
  prompt = "Identify any unusual
          ordering patterns"

)

## Claude: "Department 3B shows a 34%
## positivity rate vs. 12% average —
## possible duplicate ordering..."

Break up with Excel.
Fall in love with R.

Healthcare generates more data than ever, yet most clinicians still rely on Excel for analysis. This micro-certificate gives you the tools to go further — faster, more reproducibly, and with the power of AI.

  • Course Length10 weeks, part-time
  • Course DeliveryOnline. The course includes live in-person lectures at St. Paul's Hospital in Vancouver, BC, which are also streamed online.
  • Course Tuition2,000 CAD
  • Next Start DateOctober 16, 2026

🎓 Who is this for?

Healthcare professionals — residents, fellows, attendings, clinical informatics specialists, lab scientists — who want to unlock the power of data without a computer science degree. If you can use Excel, you can learn R.

Prerequisites

Familiarity with Excel No coding experience needed No statistics background required

Upon Completion

UBC Micro-certificate R Programming Skills AI / Claude API Interactive Dashboards Reproducible Research

Agentic Analytics with Claude

This course includes a unique, forward-looking module: using Anthropic's Claude as an intelligent analytics agent directly inside your R workflows — prompting it, parsing its output, and building AI-assisted pipelines.

💬

Natural Language Queries on Your Data

Send your summarized dataset to Claude and ask it to spot anomalies, draft interpretation paragraphs, or suggest next analyses — all without leaving R.

🔧

AI-Assisted Code Generation

Learn when and how to use Claude to generate, debug, and refactor R code — and critically, how to evaluate and improve what the LLM produces.

🔁

Agentic Loops in R

Build multi-step agentic workflows: R calls Claude, parses the response, runs follow-up analyses, and iterates — automating data quality review and narrative report generation.

Critical AI Literacy

Understand the limits and failure modes of LLMs in analytical contexts — hallucination, overconfidence, and how to validate AI-generated insights against your own R calculations.

agentic_pipeline.R
# Build an agentic analytics loop
library(httr2)
library(jsonlite)

call_claude <- function(prompt, data_summary) {
  body <- list(
    model = "claude-sonnet-4-6",
    max_tokens = 1024,
    messages = list(list(
      role = "user",
      content = paste(prompt, data_summary)
    ))
  )
  request("https://api.anthropic.com/v1/messages") |>
  req_headers("x-api-key" = Sys.getenv("ANTHROPIC_KEY")) |>
  req_body_json(body) |>
  req_perform() |>
  resp_body_json()
}

# Agentic loop: analyze, interpret, iterate
for (dept in unique(lab_data$dept)) {
  stats <- summarize_dept(lab_data, dept)
  ai_note <- call_claude("Flag anomalies:", stats)
  report_append(dept, stats, ai_note)
}

Curriculum Overview

Module 01
Manage Basic Tasks in R & Work with Data Structures
  • Write and execute basic R commands.
  • Understand and use vectors, matrices, lists, and data frames.
  • Apply indexing, subsetting, and filtering techniques.
  • Use vectorized functions.
Module 02
Data Import, Cleansing & Filtering
  • Import and export data from various formats.
  • Identify and handle missing values and outliers.
  • Basic use of regular expressions.
  • Use dplyr functions (part 1): pipes, arrange, filter, pull, select, relocate, mutate, transmute, rename.
Module 03
Introduction to tidyverse
  • Tidy vs. non-tidy data.
  • dplyr and other tidyverse tools.
Module 04
Perform Exploratory Data Analysis
  • Use dplyr functions (part 2): group_by and summarize to gain rapid insights by category.
  • Join data sets to one another.
  • Basics of data visualization.
Module 05
Data Visualization with ggplot
  • Produce publication-quality figures with R's graphics functions.
  • Create visualizations using ggplot2.
Module 06
Use R for Basic Statistical Analysis
  • Apply common statistical tests (t-tests, chi-square, correlation).
  • Generate p-values and confidence intervals in various contexts.
Module 07
Use R for Reproducible Research
  • Generate reports using R Markdown for PDF or HTML output.
  • Create reproducible research workflows.
  • Understand how to automate an R analysis.
Module 08
Effective Use of Large Language Models for Code Generation
  • Understand what ChatGPT and other LLMs are useful for — and not useful for.
  • Use LLM prompts effectively to generate code blocks.
  • Avoid poorly written LLM-generated code.
Module 09
Dashboard Production
  • Present findings through dashboards or interactive visualizations using flexdashboard.
  • Understand what is required to create and implement an interactive dashboard with Shiny.
Module 10
Capstone Project
A guided, hands-on project where you apply everything you've learned to a real healthcare dataset of your choosing.

Important Course Dates

MilestoneDate
In-person kickoff session at St. Paul's Hospital (also available via live stream)October 16, 2026
Holiday BreakDecember 14 – January 7, 2026
Course resumes with an in-person lecture at St. Paul's Hospital (also available via live stream)January 8, 2026
Capstone ProjectJanuary 25 – February 5, 2027

Taught by clinicians who use R every day.

Dr. Daniel T. Holmes
Dr. Daniel T. Holmes
MD, FRCPC  ·  Clinical Professor
Head & Medical Director, Dept. of Pathology & Laboratory Medicine, Providence Health Care
Clinical Chemistry Data Analytics Lead, Provincial Laboratory Medicine Service
University of British Columbia
Dr. Holmes is the architect of this program and one of Canada's foremost advocates for data literacy in laboratory medicine. With a BSc in Chemical Physics (University of Toronto) and an MD from UBC, he has spent two decades applying R to clinical lipidology, endocrinology, and mass spectrometry workflows. He has delivered R workshops at conferences across Canada, the USA, Europe, and Asia, consistently drawing audiences of 30–50 participants per session.
Dr. Amir Karin
Dr. Amir Karin
PhD, FCACB  ·  Clinical Assistant Professor
Clinical Biochemist, Vancouver General Hospital
Department of Pathology & Laboratory Medicine
University of British Columbia
Dr. Karin brings deep expertise in analytical and biomolecular chemistry to the course. He holds a PhD in Chemistry from the University of Toronto and completed post-doctoral clinical chemistry training through the Laboratory Medicine & Pathobiology program. His work centres on clinical mass spectrometry, laboratory quality improvement, and patient safety, making him an invaluable guide to real-world data challenges in the clinical lab.
Dr. Dennis Orton
Dr. Dennis Orton
PhD, FCACB  ·  Clinical Associate Professor
Clinical Biochemist, BC Children's Hospital
Department of Pathology & Laboratory Medicine
University of British Columbia
Dr. Orton is a paediatric clinical biochemist with a PhD in Pathology from Dalhousie University and fellowship training at the University of Calgary. His research spans clinical mass spectrometry method development, targeted proteomics, pharmacogenomics, and rare disease diagnostics in paediatric populations. With 19 peer-reviewed publications, he brings rigour and a passion for minimally invasive diagnostics to everything he teaches.
Dr. Janet Simons
Dr. Janet Simons
MD, FRCPC (Int Med & Med Biochem)
Medical Biochemist, St. Paul's Hospital, Providence Health Care
Clinical Assistant Professor
University of British Columbia
Dr. Simons is uniquely dual-qualified in both Internal Medicine and Medical Biochemistry, bridging the gap between bedside practice and the clinical laboratory. A graduate of McMaster University, her research focuses on cardiac biomarkers, lipid disorders, and test utilisation — areas where data-driven thinking directly improves patient care. She was named a 2022 Choosing Wisely Champion for her leadership in appropriate laboratory test utilisation.

What you'll be able to do.

By the end of this micro-certificate, you will have gained practical, portfolio-ready skills that distinguish you in academic, clinical, and industry settings.

Use basic R commands and data types such as vectors, lists, and data frames.

Select, filter, and manipulate data efficiently using indexing and tidyverse tools.

Write conditional statements and apply loops or functions to streamline tasks.

Replace loops with vectorized operations for faster computation.

Import and export data in common formats like CSV, Excel, and JSON.

Clean data, handle missing values, and manage outliers.

Summarize data using descriptive statistics and group-based calculations.

Create high-quality visualizations using base R and ggplot2.

Apply basic statistical tests (e.g., t-tests, chi-square, correlation) and interpret results.

Manage and perform calculations with dates.

Create and use custom functions.

Generate reproducible reports with R Markdown / Quarto in PDF or HTML.

Perform basic file operations such as reading directories and renaming files.

Understand how and when to use tools like ChatGPT and Claude Code to support R coding.

Write and refine code using AI-generated suggestions while avoiding poor practices.

Build and present interactive dashboards using flexdashboard and Shiny.

Tuition Subsidies for Students

We are offering four 1,000 CAD tuition subsidies for students enrolling in the October 2026 intake. Eligible applicants — including medical, graduate, and undergraduate students — must submit their application by July 31, 2026. Selected recipients will be contacted directly by the end of August.

Apply for a Subsidy

Frequently Asked Questions

Who should take this course?
This course is designed for healthcare professionals who want to strengthen their data-analytics skills by learning to use the R programming language to analyze medical datasets while leveraging generative artificial intelligence tools.
Am I eligible to take this course?
This micro-certificate is open to learners from all backgrounds, with no prior programming or statistics experience required. It is designed to be inclusive and accessible to healthcare professionals across all fields of medicine.
What is the refund policy?
Students can withdraw from the course within 14 days of the course start date. Course fees will be refunded (less a $300 library and administration fee). If cancellation occurs prior to the start of the program, only the administration fee (~$50) will be retained.

Ready to transform how you work with data?

Join a community of healthcare professionals learning to move beyond spreadsheets — and into the future of clinical analytics with R and AI.