InsuSensCalc 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:
{r setup-libraries} library(dplyr) library(magrittr) library(tibble)
If missing any, install via
install.packages("package_name").
Install from CRAN or GitHub:
{r install-cran} install.packages("InsuSensCalc")
Or directly from GitHub:
{r install-github} remotes::install_github("sufyansuleman/InsuSensCalc")
isi_calculator Functionisi_calculator takes a dataframe as input, calculating
insulin sensitivity indices for:
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:
```{r calculate-indices} # 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)
## Citation
If you use `InsuSensCalc` in your research, please cite the study that motivated this package and mention the package in your methods section. This package was developed from and used in the published study:
- PubMed: https://pubmed.ncbi.nlm.nih.gov/38635292/
Suggested citation language:
> 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:
```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.