README.md

clinChat

Conversational interfaces for clinical data using Large Language Models in R.

clinChat helps clinical researchers, biostatisticians, and data scientists explore structured clinical datasets through natural language chat interfaces. It is built on the modern R LLM stack (ellmer + shinychat) and prioritizes privacy: your data stays local; the model only sees tool results you explicitly allow.

Features

Installation

# Install dependencies first
install.packages(c("shiny", "ellmer", "shinychat", "dplyr"))

# Then install this package (once on CRAN or from GitHub)
# install.packages("clinChat")
# or
# remotes::install_github("shekharchalwadigrepo-hub/clinChat")

Quick Start

library(clinChat)

# Example 1: Clinical trial data
set.seed(42)
trial_data <- data.frame(
  subject_id = paste0("S", 1:50),
  age = sample(20:80, 50, replace = TRUE),
  sex = sample(c("M", "F"), 50, replace = TRUE),
  treatment = sample(c("Drug A", "Placebo"), 50, replace = TRUE),
  response = sample(c("Yes", "No"), 50, replace = TRUE)
)

chat <- create_clinical_chat(trial_data)
# chat$chat("What is the response rate by treatment?")

# Example 2: Lab values
lab_data <- data.frame(
  patient_id = 1:40,
  age = sample(30:70, 40, replace = TRUE),
  diagnosis = sample(c("Diabetes", "Hypertension", "None"), 40, replace = TRUE),
  hba1c = round(rnorm(40, 7.0, 1.2), 1)
)

chat2 <- create_clinical_chat(lab_data)
# chat2$chat("How many patients have diabetes? What is their mean HbA1c?")

Launch a Shiny App

run_clinchat_app(trial_data, title = "Trial Data Chat")

Privacy Notes

Development Status

This is an initial release designed to be CRAN-ready. Contributions and feedback are welcome.

License

MIT



Try the clinChat package in your browser

Any scripts or data that you put into this service are public.

clinChat documentation built on Nov. 12, 2026, 1:07 a.m.