Learn R Programming

iglu (version 3.0.0)

episode_calculation: Calculates the number of Hypo/Hyperglycemic events as well as other statistics

Description

The function episode calculation produces the number of Hypo/Hyperglycemic events as well as other statistics such as mean duration

Usage

episode_calculation(
  data,
  lv1_hypo = 100,
  lv2_hypo = 70,
  lv1_hyper = 120,
  lv2_hyper = 160,
  dur_length = 15
)

Arguments

data

DataFrame object with column names "id", "time", and "gl"

lv1_hypo

A double specifying a hypoglycemia threshold for level 1

lv2_hypo

A double specifying a hypoglycemia threshold for level 2

lv1_hyper

A double specifying a hyperglycemia threshold for level 1

lv2_hyper

A double specifying a hyperglycemia threshold for level 2

dur_length

An integer or a double specifying a duration length in minutes

Value

A dataframe with

Hypo_ep

A mean value that counts the number of hypogyclemia episodes per days

Hyper_ep

A mean value that counts the number of hypergyclemia episodes per days

hypo_duration

A mean value of the hypoglycemia durations per days

hyper_duration

A mean value of the hyperclycemia durations per days

low_alert

A mean percentage of time in level 1 and 2 hypoglycemic range

target_range

A mean percentage of time in target range

high_alert

A mean percentage of time in level 1 and 2 hyperglycemic ranges

hypo_min_avg

A mean percentage of time for the hypoglycemia per days

hyper_min_avg

A mean Percentage of time for the hyperglycemia per days

Examples

Run this code
# NOT RUN {
episode_calculation(example_data_5_subject, lv1_hypo=100, lv1_hyper= 120)

# }

Run the code above in your browser using DataLab