InsuSensCalc (Insulin Sensitivity Calculator, or ISC for short) provides reproducible calculators for a wide range of insulin sensitivity indices derived from common clinical and research measurements (fasting, OGTT, adipose tissue, tracer studies and DXA). It is designed to be:
Install from CRAN or GitHub and run a quick example:
install.packages("InsuSensCalc") # or remotes::install_github("sufyansuleman/InsuSensCalc")
library(InsuSensCalc)
data(example_data)
res <- isi_calculator(example_data, category = c("fasting", "ogtt"))
head(res)
InsuSensCalc is an R package for computing insulin sensitivity indices from fasting, OGTT, adipose tissue, tracer, and DXA data. It provides a single, reproducible workflow to calculate multiple established insulin sensitivity measures used in metabolic research.
This package was developed as part of the study available at https://pubmed.ncbi.nlm.nih.gov/38635292/. The package was used to support the analyses reported in that work, and it is intended for researchers who need a consistent, easy-to-use calculator for insulin sensitivity indices.
Note: This README is the package landing page. No additional pkgdown website is included at this time.
Load the necessary R libraries:
library(dplyr)
library(magrittr)
library(tibble)
If missing any, install via install.packages("package_name").
Install from CRAN or GitHub:
install.packages("InsuSensCalc")
Or directly from GitHub:
remotes::install_github("sufyansuleman/InsuSensCalc")
isi_calculator FunctionThe package has a single main function, isi_calculator, where isi stands for Insulin Sensitivity Indices. It takes a dataframe as input and returns the same data with the requested insulin sensitivity indices appended as new columns. Indices are grouped by the type of measurement they are derived from (fasting, OGTT, adipose tissue, tracer/DXA), and you choose which groups to compute with the category argument.
data: Your dataframe.category: Indices categories to calculate. Options: "fasting", "ogtt", "adipo", "tracer_dxa".The isi_calculator function computes various insulin sensitivity (IS) indices across different data categories.
Indices calculated from fasting measurements are essential for assessing baseline insulin sensitivity and resistance.
OGTT-based indices are derived from glucose and insulin responses to an oral glucose tolerance test, offering insights into dynamic insulin sensitivity.
Adipose tissue-related indices focus on the interactions between insulin sensitivity and adipose tissue metrics.
These specialized indices involve tracer and dual-energy X-ray absorptiometry (DXA) measurements, providing advanced assessments of insulin resistance.
Structure your data with the following columns and units:
age: Yearssex: 1 (male) or 0/2 (female)I0: Fasting insulin (pmol/L)G0: Fasting glucose (mmol/L)I30, I120: Insulin at 30 and 120 mins post-glucose (pmol/L)G30, G120: Glucose at 30 and 120 mins post-glucose (mmol/L)HDL_c: HDL cholesterol (mmol/L)FFA: Free fatty acids (mmol/L)waist: Waist circumference (cm)weight: Weight (kg)bmi: Body Mass Index (kg/m^2)TG: Triglycerides (mmol/L)rate_palmitate, rate_glycerol: Tracer rates (arbitrary units)fat_mass: Fat mass (kg)Column names are case sensitive and must match exactly.
Calculate indices with your formatted data:
# Define or load your dataframe 'your_data'
result <- isi_calculator(your_data, "fasting")
result <- isi_calculator(your_data, "ogtt")
result <- isi_calculator(your_data, category = c("fasting", "ogtt"))
result <- isi_calculator(your_data, category = c("fasting", "ogtt", "adipo", "tracer_dxa"))
print(result)
If you use InsuSensCalc in your research, please cite both the package and the underlying study.
Suleman, S. (2025). InsuSensCalc: An R package for computing insulin sensitivity indices. Zenodo. https://doi.org/10.5281/zenodo.20647742
Or in BibTeX:
@software{suleman_insusensecalc_2025,
author = {Suleman, Sufyan},
title = {InsuSensCalc: An R package for computing insulin sensitivity indices},
year = {2025},
publisher = {Zenodo},
doi = {10.5281/zenodo.20647742},
url = {https://doi.org/10.5281/zenodo.20647742}
}
This package was developed from and used in the published study:
Suleman S, et al. InsuSensCalc package for insulin sensitivity index calculation. Study available at PubMed PMID 38635292. Please cite the package and the underlying study when using it in your research.
You can also use the built-in citation helper from R:
citation("InsuSensCalc")
The resulting dataframe lists calculated indices. Missing data points will not have the corresponding index value. Output columns are raw, non-standardized values of the indices that may require normalization or standardization prior to any statistical analysis or visualization.
The InsuSensCalc package’s isi_calculator function offers a detailed methodology for insulin sensitivity analysis, supporting a range of data types for metabolic health research. Please cite this package and the associated study when using InsuSensCalc in your publications. The package will be updated with new indices and features in the future.