knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The 'isi_calculator' function is a comprehensive tool designed to calculate a wide array of surrogate insulin sensitivity indices. This vignette provides a detailed guide on installing the package, understanding its usage, and interpreting the output effectively.
Before using 'isi_calculator'function from the 'InsuSensCalc' package, ensure that the necessary dependencies are installed and loaded into your R session for example: dplyr, magrittr and tibble.
Additionally, you need to install the 'InsuSensCalc' package itself. If It is available on CRAN, install it using:
install.packages("InsuSensCalc")
Or, if it's not on CRAN, you can install it directly from its repository, for example, GitHub: using devtools::install_github("sufyansuleman/InsuSensCalc")
The 'isi_calculator' function is designed to be flexible, accommodating various types of input data related to insulin sensitivity calculations:
Your input dataframe should include columns corresponding to the required measurements for your chosen calculation categories. The column names should match the expected names exactly.
data
: The input dataframe.category
: A character vector specifying which indices to calculate. Available options: "fasting"
, "ogtt"
, "adipo"
, and "tracer_dxa"
.The function includes automatic unit conversions for relevant variables and handles missing data gracefully, either skipping calculations for missing variables or setting indices to NA when applicable.
# Load the package library(InsuSensCalc) # Load your data # example_data <- read.csv("path/to/your/data.csv") # Sample usage of the function result_fasting <- isi_calculator(example_data, category = "fasting") result_ogtt <- isi_calculator(example_data, category = "ogtt") result_adipo <- isi_calculator(example_data, category = "adipo") result_combined <- isi_calculator(example_data, category = c("fasting", "ogtt", "adipo", "tracer_dxa")) # Print a result to view print(result_fasting)
The output of 'isi_calculator' is a dataframe containing the calculated indices for each specified category. These values are provided without normalization or transformation. It is advisable to normalize these values according to your analysis needs, especially when planning to conduct statistical testing or visualization.
The 'InsuSensCalc' package and its 'isi_calculator' function offer a robust solution for calculating insulin sensitivity indices from a variety of data types. By following the guidelines in this vignette, you can effectively utilize this tool for your research or clinical assessments related to insulin sensitivity and metabolic health.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.