The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.