# philippemichel/baseph architecture

> Architecture diagram of the GitHub repository philippemichel/baseph, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/philippemichel/baseph
- Repository: https://github.com/philippemichel/baseph

## Overview

baseph is an R package of utilities for small clinical studies. An analyst can use its standalone helpers for randomization, formatting, data preparation, and sample-size estimation, and its chart functions to visualize clinical data; it also provides example datasets and a few table-formatting/export helpers. The README documents capabilities but no calls between package functions, so the graph shows analyst-to-feature use rather than an invented internal pipeline. No source excerpts were available; paths and relationships below rely on the repository tree and README.

Main entry points: [`R/listrandph.R`](https://github.com/philippemichel/baseph/blob/main/R/listrandph.R) (Randomization lists), [`R/beaup.R`](https://github.com/philippemichel/baseph/blob/main/R/beaup.R) (P-value formatting), [`R/bmiph.R`](https://github.com/philippemichel/baseph/blob/main/R/bmiph.R) (BMI categories), [`R/debph.R`](https://github.com/philippemichel/baseph/blob/main/R/debph.R) (Analysis setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_helpers["Clinical helpers"]
  node_randomization["Randomization lists<br/>[listrandph.R]"]
  node_p_format["P-value formatting<br/>[beaup.R]"]
  node_bmi["BMI categories<br/>[bmiph.R]"]
  node_setup["Analysis setup<br/>[debph.R]"]
  node_ci_number["CI number display<br/>[bicph.R]"]
  node_multi_response["Multiple responses<br/>[multirep.R]"]
  node_misc_functions["Other utilities<br/>[bashaut.R]"]
  node_mean_ci["Mean confidence interval<br/>[moyciph.R]"]
  node_means["Means<br/>[moys.R]"]
  node_transforms["Angle transforms<br/>[transang.R]"]
  node_misc_stats["Other statistics<br/>[nesp.R]"]
end

subgraph group_charts["Clinical charts"]
  node_bar_ci["Bar CI chart<br/>[barconfph.R]"]
  node_bar_simple["Simple bar chart<br/>[barsimpleph.R]"]
  node_bar_desc["Descending bar chart<br/>[bardecph.R]"]
  node_bar_yesno["Binary bar chart<br/>[barouiph.R]"]
  node_violin_box["Violin boxplot<br/>[vioboxph.R]"]
  node_raincloud["Raincloud chart<br/>[raincloudph.R]"]
  node_lollipop["Lollipop chart<br/>[lollipopph.R]"]
  node_figure_pvalue["P-value annotation<br/>[figp.R]"]
  node_hist_multi["Multiple histograms<br/>[histmultiph.R]"]
  node_misc_charts["Other charts<br/>[bardeuxph.R]"]
end

subgraph group_tables["Tables and export"]
  node_table_format["Table formatting<br/>[tabph.R]"]
  node_table_export["Table export<br/>[expk.R]"]
  node_table_graph_export["Table graph export<br/>[gexpk.R]"]
end

subgraph group_data["Data and planning"]
  node_sample_size["Sample size<br/>[nbobsph.R]"]
  node_patient_data[("Patient dataset<br/>[patients.R]")]
  node_variable_labels[("Variable labels<br/>[bnom.R]")]
end

node_analyst(("Clinical analyst"))

node_analyst -->|"creates lists"| node_randomization
node_analyst -->|"formats p-values"| node_p_format
node_analyst -->|"bins BMI"| node_bmi
node_analyst -->|"prepares analysis"| node_setup
node_analyst -->|"formats CI"| node_ci_number
node_analyst -->|"summarizes responses"| node_multi_response
node_analyst -->|"plots data"| node_bar_ci
node_analyst -->|"plots data"| node_bar_simple
node_analyst -->|"plots data"| node_bar_desc
node_analyst -->|"plots data"| node_bar_yesno
node_analyst -->|"plots data"| node_violin_box
node_analyst -->|"plots data"| node_raincloud
node_analyst -->|"plots data"| node_lollipop
node_analyst -->|"annotates figures"| node_figure_pvalue
node_analyst -->|"formats tables"| node_table_format
node_analyst -->|"exports tables"| node_table_export
node_analyst -->|"exports tables"| node_table_graph_export
node_analyst -->|"estimates subjects"| node_sample_size
node_analyst -->|"uses example data"| node_patient_data
node_analyst -->|"uses labels"| node_variable_labels

click node_randomization "https://github.com/philippemichel/baseph/blob/main/R/listrandph.R"
click node_p_format "https://github.com/philippemichel/baseph/blob/main/R/beaup.R"
click node_bmi "https://github.com/philippemichel/baseph/blob/main/R/bmiph.R"
click node_setup "https://github.com/philippemichel/baseph/blob/main/R/debph.R"
click node_ci_number "https://github.com/philippemichel/baseph/blob/main/R/bicph.R"
click node_multi_response "https://github.com/philippemichel/baseph/blob/main/R/multirep.R"
click node_bar_ci "https://github.com/philippemichel/baseph/blob/main/R/barconfph.R"
click node_bar_simple "https://github.com/philippemichel/baseph/blob/main/R/barsimpleph.R"
click node_bar_desc "https://github.com/philippemichel/baseph/blob/main/R/bardecph.R"
click node_bar_yesno "https://github.com/philippemichel/baseph/blob/main/R/barouiph.R"
click node_violin_box "https://github.com/philippemichel/baseph/blob/main/R/vioboxph.R"
click node_raincloud "https://github.com/philippemichel/baseph/blob/main/R/raincloudph.R"
click node_lollipop "https://github.com/philippemichel/baseph/blob/main/R/lollipopph.R"
click node_figure_pvalue "https://github.com/philippemichel/baseph/blob/main/R/figp.R"
click node_hist_multi "https://github.com/philippemichel/baseph/blob/main/R/histmultiph.R"
click node_table_format "https://github.com/philippemichel/baseph/blob/main/R/tabph.R"
click node_table_export "https://github.com/philippemichel/baseph/blob/main/R/expk.R"
click node_table_graph_export "https://github.com/philippemichel/baseph/blob/main/R/gexpk.R"
click node_sample_size "https://github.com/philippemichel/baseph/blob/main/R/nbobsph.R"
click node_patient_data "https://github.com/philippemichel/baseph/blob/main/R/patients.R"
click node_variable_labels "https://github.com/philippemichel/baseph/blob/main/R/bnom.R"
click node_misc_functions "https://github.com/philippemichel/baseph/blob/main/R/bashaut.R"
click node_mean_ci "https://github.com/philippemichel/baseph/blob/main/R/moyciph.R"
click node_means "https://github.com/philippemichel/baseph/blob/main/R/moys.R"
click node_transforms "https://github.com/philippemichel/baseph/blob/main/R/transang.R"
click node_misc_stats "https://github.com/philippemichel/baseph/blob/main/R/nesp.R"
click node_misc_charts "https://github.com/philippemichel/baseph/blob/main/R/bardeuxph.R"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_randomization,node_p_format,node_bmi,node_setup,node_ci_number,node_multi_response,node_misc_functions,node_mean_ci,node_means,node_transforms,node_misc_stats toneBlue
class node_bar_ci,node_bar_simple,node_bar_desc,node_bar_yesno,node_violin_box,node_raincloud,node_lollipop,node_figure_pvalue,node_hist_multi,node_misc_charts toneAmber
class node_table_format,node_table_export,node_table_graph_export toneMint
class node_sample_size,node_patient_data,node_variable_labels toneRose
class node_analyst toneIndigo
```

## Components

### Clinical helpers

- [Randomization lists](https://github.com/philippemichel/baseph/blob/main/R/listrandph.R): `R/listrandph.R`
- [P-value formatting](https://github.com/philippemichel/baseph/blob/main/R/beaup.R): `R/beaup.R`
- [BMI categories](https://github.com/philippemichel/baseph/blob/main/R/bmiph.R): `R/bmiph.R`
- [Analysis setup](https://github.com/philippemichel/baseph/blob/main/R/debph.R): `R/debph.R`
- [CI number display](https://github.com/philippemichel/baseph/blob/main/R/bicph.R): `R/bicph.R`
- [Multiple responses](https://github.com/philippemichel/baseph/blob/main/R/multirep.R): `R/multirep.R`
- [Other utilities](https://github.com/philippemichel/baseph/blob/main/R/bashaut.R): `R/bashaut.R`
- [Mean confidence interval](https://github.com/philippemichel/baseph/blob/main/R/moyciph.R): `R/moyciph.R`
- [Means](https://github.com/philippemichel/baseph/blob/main/R/moys.R): `R/moys.R`
- [Angle transforms](https://github.com/philippemichel/baseph/blob/main/R/transang.R): `R/transang.R`
- [Other statistics](https://github.com/philippemichel/baseph/blob/main/R/nesp.R): `R/nesp.R`

### Clinical charts

- [Bar CI chart](https://github.com/philippemichel/baseph/blob/main/R/barconfph.R): `R/barconfph.R`
- [Simple bar chart](https://github.com/philippemichel/baseph/blob/main/R/barsimpleph.R): `R/barsimpleph.R`
- [Descending bar chart](https://github.com/philippemichel/baseph/blob/main/R/bardecph.R): `R/bardecph.R`
- [Binary bar chart](https://github.com/philippemichel/baseph/blob/main/R/barouiph.R): `R/barouiph.R`
- [Violin boxplot](https://github.com/philippemichel/baseph/blob/main/R/vioboxph.R): `R/vioboxph.R`
- [Raincloud chart](https://github.com/philippemichel/baseph/blob/main/R/raincloudph.R): `R/raincloudph.R`
- [Lollipop chart](https://github.com/philippemichel/baseph/blob/main/R/lollipopph.R): `R/lollipopph.R`
- [P-value annotation](https://github.com/philippemichel/baseph/blob/main/R/figp.R): `R/figp.R`
- [Multiple histograms](https://github.com/philippemichel/baseph/blob/main/R/histmultiph.R): `R/histmultiph.R`
- [Other charts](https://github.com/philippemichel/baseph/blob/main/R/bardeuxph.R): `R/bardeuxph.R`

### Tables and export

- [Table formatting](https://github.com/philippemichel/baseph/blob/main/R/tabph.R): `R/tabph.R`
- [Table export](https://github.com/philippemichel/baseph/blob/main/R/expk.R): `R/expk.R`
- [Table graph export](https://github.com/philippemichel/baseph/blob/main/R/gexpk.R): `R/gexpk.R`

### Data and planning

- [Sample size](https://github.com/philippemichel/baseph/blob/main/R/nbobsph.R): `R/nbobsph.R`
- [Patient dataset](https://github.com/philippemichel/baseph/blob/main/R/patients.R): `R/patients.R`
- [Variable labels](https://github.com/philippemichel/baseph/blob/main/R/bnom.R): `R/bnom.R`

### Other components

- **Clinical analyst**

## Connections

- Clinical analyst → Randomization lists: creates lists (evidence: `README.md`)
- Clinical analyst → P-value formatting: formats p-values (evidence: `README.md`)
- Clinical analyst → BMI categories: bins BMI (evidence: `README.md`)
- Clinical analyst → Analysis setup: prepares analysis (evidence: `README.md`)
- Clinical analyst → CI number display: formats CI (evidence: `README.md`)
- Clinical analyst → Multiple responses: summarizes responses (evidence: `README.md`)
- Clinical analyst → Bar CI chart: plots data (evidence: `README.md`)
- Clinical analyst → Simple bar chart: plots data (evidence: `README.md`)
- Clinical analyst → Descending bar chart: plots data (evidence: `README.md`)
- Clinical analyst → Binary bar chart: plots data (evidence: `README.md`)
- Clinical analyst → Violin boxplot: plots data (evidence: `README.md`)
- Clinical analyst → Raincloud chart: plots data (evidence: `README.md`)
- Clinical analyst → Lollipop chart: plots data (evidence: `README.md`)
- Clinical analyst → P-value annotation: annotates figures (evidence: `README.md`)
- Clinical analyst → Table formatting: formats tables (evidence: `README.md`)
- Clinical analyst → Table export: exports tables (evidence: `README.md`)
- Clinical analyst → Table graph export: exports tables (evidence: `README.md`)
- Clinical analyst → Sample size: estimates subjects (evidence: `README.md`)
- Clinical analyst → Patient dataset: uses example data (evidence: `README.md`)
- Clinical analyst → Variable labels: uses labels (evidence: `README.md`)
