Package 'gluvarpro'

Title: Glucose Variability Measures from Continuous Glucose Monitoring Data
Description: Calculate different glucose variability measures, including average measures of glycemia, measures of glycemic variability and measures of glycemic risk, from continuous glucose monitoring data. Boris P. Kovatchev, Erik Otto, Daniel Cox, Linda Gonder-Frederick, and William Clarke (2006) <doi:10.2337/dc06-1085>. Jean-Pierre Le Floch, Philippe Escuyer, Eric Baudin, Dominique Baudon, and Leon Perlemuter (1990) <doi:10.2337/diacare.13.2.172>. C.M. McDonnell, S.M. Donath, S.I. Vidmar, G.A. Werther, and F.J. Cameron (2005) <doi:10.1089/dia.2005.7.253>. Everitt, Brian (1998) <doi:10.1111/j.1751-5823.2011.00149_2.x>. Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <doi:10.2307/2234167>. Dougherty, R. L., Edelman, A. and Hyman, J. M. (1989) <doi:10.1090/S0025-5718-1989-0962209-1>. Tukey, J. W. (1977) <doi:10.1016/0377-2217(86)90209-2>. F. John Service (2013) <doi:10.2337/db12-1396>. Edmond A. Ryan, Tami Shandro, Kristy Green, Breay W. Paty, Peter A. Senior, David Bigam, A.M. James Shapiro, and Marie-Christine Vantyghem (2004) <doi:10.2337/diabetes.53.4.955>. F. John Service, George D. Molnar, John W. Rosevear, Eugene Ackerman, Leal C. Gatewood, William F. Taylor (1970) <doi:10.2337/diab.19.9.644>. Sarah E. Siegelaar, Frits Holleman, Joost B. L. Hoekstra, and J. Hans DeVries (2010) <doi:10.1210/er.2009-0021>. Gabor Marics, Zsofia Lendvai, Csaba Lodi, Levente Koncz, David Zakarias, Gyorgy Schuster, Borbala Mikos, Csaba Hermann, Attila J. Szabo, and Peter Toth-Heyn (2015) <doi:10.1186/s12938-015-0035-3>. Thomas Danne, Revital Nimri, Tadej Battelino, Richard M. Bergenstal, Kelly L. Close, J. Hans DeVries, SatishGarg, Lutz Heinemann, Irl Hirsch, Stephanie A. Amiel, Roy Beck, Emanuele Bosi, Bruce Buckingham, ClaudioCobelli, Eyal Dassau, Francis J. Doyle, Simon Heller, Roman Hovorka, Weiping Jia, Tim Jones, Olga Kordonouri,Boris Kovatchev, Aaron Kowalski, Lori Laffel, David Maahs, Helen R. Murphy, Kirsten Nørgaard, Christopher G.Parkin, Eric Renard, Banshi Saboo, Mauro Scharf, William V. Tamborlane, Stuart A. Weinzimer, and Moshe Phillip.International consensus on use of continuous glucose monitoring.Diabetes Care, 2017 <doi:10.2337/dc17-1600>.
Authors: Sergio Contador
Maintainer: Sergio Contador <[email protected]>
License: GPL-2
Version: 7.0
Built: 2024-11-16 03:49:24 UTC
Source: https://github.com/cran/gluvarpro

Help Index


average daily risk range

Description

Average daily risk range is a measure of glycemic risk that is based on risk values obtained from glucose levels that are mathematically transformed to give equal weight to hyperglycemic and hypoglycemic excursions. The adrrgvp is scored based on risk categories: Low risk, [0,20); moderate risk, [20,40); and high risk, 40 and above.

Usage

adrrgvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the adrr values.

Author(s)

Sergio Contador.

References

Boris P. Kovatchev, Erik Otto, Daniel Cox, Linda Gonder-Frederick, and William Clarke. Evaluation of a new measure of blood glucose variability in diabetes. Diabetes Care, 29(11):2433–2438, 2006.

See Also

bgigvp(x, t = 24)

Examples

data("datagvp1")
adrrgvp(datagvp1)

area under curve

Description

Area under curve is an average measure of glycemia that quantifies the average exposure to hypoglycemia and hyperglycemia events. The integral trapezoidal cumulative function is used to calculate the area. The area under a curve between two points can be found by doing a definite integral between the two points. To find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Usage

aucgvp(x, t = 24, tdown = 70, tup = 180)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculate measure. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

tdown

Numeric value with target range low. Default value of 70 [mg/dl].

tup

Numeric value with target range high. Default value of 180 [mg/dl].

Value

A data frame containing the lauc, hauc and auc values.

Author(s)

Sergio Contador.

References

Jean-Pierre Le Floch, Philippe Escuyer, Eric Baudin, Dominique Baudon, and Leon Perlemuter. Blood glucose area under the curve: Methodological aspects. Diabetes Care, 13(2):172–175, 1990.

Examples

data("datagvp1")
aucgvp(datagvp1)

average mean

Description

Generic function for the arithmetic mean and the standard deviation.

Usage

avggvp(x, var = "glucose", sd = FALSE)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose or variability measure: glucose value or glucose variability measure.

var

Character value with variable to calculate the mean value and the standard deviation. Permitted values are glucose, adrr, lauc, hauc, auc, lbgi, hbgi, bgi, conga, cv, iqr, ji, li, ge, lmage, hmage, mage, mean, mv, sd, lpstr, hpstr, npstr and pstr. Default value is glucose.

sd

Logical value to calculate the standard deviation. Default value is FALSE.

Value

A numeric value containing the mean value or a character value containing the mean value and the standard deviation.

Author(s)

Sergio Contador.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Examples

data("datagvp1")
avggvp(datagvp1)

blood glucose index

Description

Blood glucose index is a measure of glycemic risk based on the same normalizing transformation as the adrrgvp measure but is specifically designed to be sensitive to hypoglycemia (lbgi) and hyperglycemia (hbgi), respectively, and to have zero correlation with their opposite ranges on the blood glucose scale. The lbgi and hbgi are scored based on risk categories: Low risk, [0,2.5); moderate risk, [2.5,5); and high risk, 5 and above.

Usage

bgigvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the lbgi, hbgi and bgi values.

Author(s)

Sergio Contador.

References

Boris P. Kovatchev, Erik Otto, Daniel Cox, Linda Gonder-Frederick, and William Clarke. Evaluation of a new measure of blood glucose variability in diabetes. Diabetes Care, 29(11):2433–2438, 2006.

See Also

adrrgvp(x, t = 24)

Examples

data("datagvp1")
bgigvp(datagvp1)

glucose characterization measures

Description

Generic function to calculate different glucose characterization measures. It calculates the average glucose, the standard deviation, and the percentages of time where the data has very low glucose levels (<54 [mg/dl]), low ([54,70) [mg/dl]), in range ([70,180] and [70,140] [mg/dl]), high (>180 [mg/dl]), and very high (>250 [mg/dl]), as defined in the recommendations of ADA (American Diabetes Association).

Usage

chargvp(x)

Arguments

x

Data-set with data frame format containing one column:

glucose: glucose value of the observation in [mg/dl].

Value

A data frame containing glucose characterization measures.

Author(s)

Sergio Contador.

References

Thomas Danne, Revital Nimri, Tadej Battelino, Richard M. Bergenstal, Kelly L. Close, J. Hans DeVries, SatishGarg, Lutz Heinemann, Irl Hirsch, Stephanie A. Amiel, Roy Beck, Emanuele Bosi, Bruce Buckingham, ClaudioCobelli, Eyal Dassau, Francis J. Doyle, Simon Heller, Roman Hovorka, Weiping Jia, Tim Jones, Olga Kordonouri,Boris Kovatchev, Aaron Kowalski, Lori Laffel, David Maahs, Helen R. Murphy, Kirsten Nørgaard, Christopher G.Parkin, Eric Renard, Banshi Saboo, Mauro Scharf, William V. Tamborlane, Stuart A. Weinzimer, and Moshe Phillip.International consensus on use of continuous glucose monitoring.Diabetes Care, 40(12):1631–1640, 2017.

See Also

plotchargvp(x, text = FALSE)

Examples

data("datagvp1")
chargvp(datagvp1)

continuous overall net glycemic action

Description

Continuous overall net glycemic action is a measure of glycemic variability specifically developed for use on continuous glucose monitoring data. It is calculated as the standard deviation of the sum of the differences between a current observation and an observation n hours previously. Because conga does not require arbitrary glucose cutoffs or arbitrary defined rises and falls, it seems to be a more objective manner to define glucose variability than mvgvp or magegvp.

Usage

congagvp(x, t = 24, ts = 5, h = 1)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

ts

Numeric value with sampling time of glucose values. Permitted values are 5 and 15 minutes. Default value of 5 minutes.

h

Numeric value with type of measure calculated. Permitted values are from 1 to 24 hours, with differences of 1 hour. Default value of 1 hour.

Value

A data frame containing the conga values.

Author(s)

Sergio Contador.

References

C.M. McDonnell, S.M. Donath, S.I. Vidmar, G.A. Werther, and F.J. Cameron. A novel approach to continuous glucose analysis utilizing glycemic variation. Diabetes Technology and Therapeutics, 7(2):253–263, 2005.

Examples

data("datagvp1")
congagvp(datagvp1)

percentage coefficient of variation

Description

Percentage coefficient of variation is a measure of glycemic variability defined as the ratio of the standard deviation to the mean.

Usage

cvgvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation.

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the cv values.

Author(s)

Sergio Contador.

References

Everitt, Brian (1998). The Cambridge Dictionary of Statistics. Cambridge, UK New York: Cambridge University Press.

See Also

meangvp(x, t = 24)

sdgvp(x, t = 24)

Examples

data("datagvp1")
cvgvp(datagvp1)

clean data-set from Abbott continuous glucose monitoring

Description

Data preprocessed from type 1 diabetic patient acquired through Abbott Freestyle Libre continuous glucose monitoring.

Usage

data("datagvp1")

Format

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

Details

Data-set with 6 complete days of data acquired with sampling time of 15 minutes. There are 576 observations in total.

Source

Hospital Universitario Principe de Asturias de Alcala de Henares, Madrid, Spain.

Examples

data("datagvp1")
datagvp1

clean data-set from Medtronic continuous glucose monitoring

Description

Data preprocessed from type 1 diabetic patient acquired through Medtronic 530-G with Enlite continuous glucose monitoring.

Usage

data("datagvp2")

Format

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

Details

Data-set with 36 complete days of data acquired with sampling time of 5 minutes. There are a total of 10368 observations, 10 with NA values of glucose.

Source

School of Electrical Engineering and Computer Science, Ohio University, Ohio, United States.

References

Cindy Marling and Razvan Bunescu. The OhioT1DM Dataset for Blood Glucose Level Prediction - DRAFT.

Examples

data("datagvp2")
datagvp2

clean data-set from Abbott continuous glucose monitoring

Description

Data preprocessed from type 1 diabetic patient acquired through Abbott Freestyle Libre continuous glucose monitoring.

Usage

data("datagvp3")

Format

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

Details

Data-set with 476 complete days of data acquired with sampling time of 15 minutes. There are 45696 observations in total.

Source

Hospital Universitario Principe de Asturias de Alcala de Henares, Madrid, Spain.

Examples

data("datagvp3")
datagvp3

raw data-set from Medtronic continuous glucose monitoring

Description

Raw data from type 1 diabetic patient acquired through Medtronic Paradigm Veo-754 continuous glucose monitoring.

Usage

data("datagvp4")

Format

Data-set with data frame format containing forty seven columns:

Index, Date (with format yyyy/mm/dd), Time (with format hh:mm:ss), New.Device.Time, BG.Reading..mg.dL., Linked.BG.Meter.ID, Basal.Rate..U.h., Temp.Basal.Amount, Temp.Basal.Type, Temp.Basal.Duration..h.mm.ss., Bolus.Type, Bolus.Volume.Selected..U., Bolus.Volume.Delivered..U., Bolus.Duration..h.mm.ss., Prime.Type, Prime.Volume.Delivered..U., Alarm, Suspend, Rewind, BWZ.Estimate..U., BWZ.Target.High.BG..mg.dL., BWZ.Target.Low.BG..mg.dL., BWZ.Carb.Ratio..U.Ex., BWZ.Insulin.Sensitivity..mg.dL.U.,BWZ.Carb.Input..exchanges., BWZ.BG.Input..mg.dL., BWZ.Correction.Estimate..U., BWZ.Food.Estimate..U., BWZ.Active.Insulin..U., Sensor.Calibration.BG..mg.dL., Sensor.Glucose..mg.dL., ISIG.Value, Event.Marker, Bolus.Number, Bolus.Cancellation.Reason, BWZ.Unabsorbed.Insulin.Total..U., Final.Bolus.Estimate, Scroll.Step.Size, Insulin.Action.Curve.Time, Sensor.Calibration.Rejected.Reason, Preset.Bolus, Bolus.Source, Network.Device.Associated.Reason, Network.Device.Disassociated.Reason, Network.Device.Disconnected.Reason, Sensor.Exception, Preset.Temp.Basal.Name.

Details

Data-set with 12 days of data acquired with sampling time of 5 minutes. There are 4004 observations in total, containing two parts: from observation 1 to 737 data from the insulin pump, and from 738 to 4004 data from the sensor.

Source

Hospital Universitario Principe de Asturias de Alcala de Henares, Madrid, Spain.

Examples

data("datagvp4")
datagvp4

fill missing glucose values from continuous glucose monitoring

Description

Generic function for replacing NA values (missing values) with interpolated values, performing linear or cubic spline interpolation of given data points.

Usage

fillgvp(x, method = "linear", n = 4)

Arguments

x

Data-set with data frame format containing one column:

glucose: glucose value of the observation.

method

Character value to replace missing values (NAs) by linear interpolation via linear or cubic spline interpolation via cubic, respectively. Default value is linear.

n

Numeric value with maximum number of consecutive NAs to fill. Any longer gaps will be left unchanged. Default value is 4.

Value

A data frame containing glucose values.

Author(s)

Sergio Contador.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988). The New S Language. Wadsworth & Brooks/Cole.

Dougherty, R. L., Edelman, A. and Hyman, J. M. (1989). Positivity-, monotonicity-, or convexity-preserving cubic and quintic Hermite interpolation. Mathematics of Computation, 52, 471–494.

Examples

data("datagvp1")
fillgvp(datagvp1)

inter-quartile range

Description

Inter-quartile range is a measure of glycemic variability defined as the difference between 75th and 25th percentiles.

Usage

iqrgvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation.

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the iqr values.

Author(s)

Sergio Contador.

References

Tukey, J. W. (1977). Exploratory Data Analysis. Reading: Addison-Wesley.

Examples

data("datagvp1")
iqrgvp(datagvp1)

j index

Description

J index is a measure of glycemic variability that combines information of the standard deviation and the mean, and excludes severe and persistent hypoglycemia.

Usage

jigvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the ji values.

Author(s)

Sergio Contador.

References

F. John Service. Glucose variability. Diabetes, 62(5):1398–1404, 2013.

Examples

data("datagvp1")
jigvp(datagvp1)

lability index

Description

Lability index is a measure of glycemic variability that evaluates the metabolic lability and its possible improvement in patients candidates for islet transplantation.

Usage

ligvp(x, t = 24, ts = 5)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

ts

Numeric value with sampling time of glucose values. Permitted values are 5 and 15 minutes. Default value of 5 minutes.

Value

A data frame containing the li values.

Author(s)

Sergio Contador.

References

Edmond A. Ryan, Tami Shandro, Kristy Green, Breay W. Paty, Peter A. Senior, David Bigam, A.M. James Shapiro, and Marie-Christine Vantyghem. Assessment of the severity of hypoglycemia and glycemic lability in type 1 diabetic subjects undergoing islet transplantation. Diabetes, 53(4):955–962, 2004.

Examples

data("datagvp1")
ligvp(datagvp1)

mean amplitude of glycemic excursions

Description

Mean amplitude of glycemic excursions is a measure of glycemic variability that calculates changes in blood glucose that exceed multiples of the standard deviation, and that are in hypoglycemic and hyperglycemic values. It is based on the number of glycemic excursions, using glucose values that are above or below the limits of hypoglycemia and hyperglycemia.

Usage

magegvp(x, t = 24, n = 1, type = "auto")

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

n

Numeric value with number of multiple values of standard deviation. Default value of 1.

type

Character value with type of mage calculation. Permitted values are auto, nardin2peak and peak2nardin. Default value is auto.

Value

A data frame containing the number of glycemic excursions ge and mage values.

Author(s)

Sergio Contador.

References

F. John Service, George D. Molnar, John W. Rosevear, Eugene Ackerman, Leal C. Gatewood, William F. Taylor. Mean Amplitude of Glycemic Excursions, a Measure of Diabetic Instability. Diabetes. Vol 9, N 19, 1970.

Examples

data("datagvp1")
magegvp(datagvp1)

arithmetic mean

Description

Arithmetic mean is an average measure of glycemia that calculates the sum of a set of data values divided by the number of data values in the data-set.

Usage

meangvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation.

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the mean values.

Author(s)

Sergio Contador.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988). The New S Language. Wadsworth & Brooks/Cole.

See Also

cvgvp(x, t = 24)

Examples

data("datagvp1")
meangvp(datagvp1)

m value

Description

M value is a measure of glycemic variability that quantifies the glycemic control of diabetic patients. It is a measure of the stability of the glucose excursions in comparison with an ideal glucose default value of 6.6 [mmol/l]-120 [mg/dl]. The m value is zero in healthy controls, rising with increasing glycemic variability or poorer glycemic control, making it difficult to distinguish between patients with either high mean glucose or high glucose variability. Moreover, because hypoglycemia has a greater impact on the m value than hyperglycemia, it is more a clinical than a mathematical indicator of glycemic control.

Usage

mvgvp(x, t = 24, gi = 120)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

gi

Numeric value with ideal glucose value. Default value of 120 [mg/dl].

Value

A data frame containing the mv values.

Author(s)

Sergio Contador.

References

Sarah E. Siegelaar, Frits Holleman, Joost B. L. Hoekstra, and J. Hans DeVries. Glucose variability; does it matter? Endocrine Reviews, 31(2):171–182, 2010.

Examples

data("datagvp1")
mvgvp(datagvp1)

box plot of glucose values and glucose variability measures

Description

Generic function for create box plot of given data points, plotting the inter-quartile range in a blue box with the median value as a horizontal line and the mean value as a red point.

Usage

plotboxgvp(x, var = "glucose")

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose or variability measure: glucose value [mg/dl] or glucose variability measure.

var

Character value with variable for plotting. Permitted values are glucose, adrr, lauc, hauc, auc, lbgi, hbgi, bgi, conga, cv, iqr, ji, li, ge, lmage, hmage, mage, mean, mv, sd, lpstr, hpstr, npstr and pstr. Default value is glucose.

Author(s)

Sergio Contador.

Examples

data("datagvp1")
plotboxgvp(datagvp1)

box plot of multiple glucose variability measures

Description

Function for create box plots of given data points arranging multiple grobs on a draw, plotting the inter-quartile range in a blue box with the median value as a horizontal line and the mean value as a red point.

Usage

plotboxmgvp(x, var = "auc")

Arguments

x

Data-set with data frame format containing five or six columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

variability measure: glucose variability measure.

var

Character value with variable for plotting. Permitted values are auc, bgi, mage, and pstr. Default value is auc.

Author(s)

Sergio Contador.

Examples

data("datagvp1")
x <- aucgvp(datagvp1)
plotboxmgvp(x)

bar plot of glucose characterization measures

Description

Generic function for create bar plot of glucose characterization measures.

Usage

plotchargvp(x, text = FALSE)

Arguments

x

Data-set with data frame format containing one column:

glucose: glucose value in [mg/dl].

text

Logical value for plotting glucose characterization measures inside the bar plot. Default value is FALSE.

Author(s)

Sergio Contador.

See Also

chargvp(x)

Examples

data("datagvp1")
plotchargvp(datagvp1)

plot glucose values and glucose variability measures

Description

Generic function for plotting given data points.

Usage

plotgvp(x, col = FALSE, var = "glucose")

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose or variability measure: glucose value [mg/dl] or glucose variability measure.

col

Logical value for plotting data points with different colours. If data-set contains more than one day, it can be selected different colors (TRUE) for each day of data or one color (FALSE). Default value is FALSE.

var

Character value with variable for plotting. Permitted values are glucose, adrr, lauc, hauc, auc, lbgi, hbgi, bgi, conga, cv, iqr, ji, li, ge, lmage, hmage, mage, mean, mv, sd, lpstr, hpstr, npstr and pstr. Default value is glucose.

Author(s)

Sergio Contador.

Examples

data("datagvp1")
plotgvp(datagvp1)

plot multiple glucose variability measures

Description

Function for plotting given data points arranging multiple grobs on a draw.

Usage

plotmgvp(x, col = FALSE, var = "auc")

Arguments

x

Data-set with data frame format containing five or six columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

variability measure: glucose variability measure.

col

Logical value for plotting data points with different colours. If data-set contains more than one day, it can be selected different colors (TRUE) for each day of data or one color (FALSE). Default value is FALSE.

var

Character value with variable for plotting. Permitted values are auc, bgi, mage, and pstr. Default value is auc.

Author(s)

Sergio Contador.

Examples

data("datagvp1")
x <- aucgvp(datagvp1)
plotmgvp(x)

preprocessing raw data from continuous glucose monitoring

Description

Generic function for preprocessing raw data from continuous glucose monitoring with glucose values collected with sampling time of 5 or 15 minutes each. The function is specially designed for preprocessing data from Medtronic and Abbott continuous glucose monitoring.

Usage

preprocessgvp(x, dp = 2, tp = 3, gp = 31, ts = 5, df = "yyyy/mm/dd",
        tf = "hh:mm:ss", all = FALSE, type = "normal")

Arguments

x

Data-set with data frame format containing at least two or three columns:

date: date of the observation with only the date or the date plus the time.

time: time of the observation with 24 hour format.

glucose: glucose value of the observation.

dp

Numeric value with column position where the variable date is. Default value of 2.

tp

Numeric value with column position where the variable time is. Default value of 3.

gp

Numeric value with column position where the variable glucose is. Default value of 31.

ts

Numeric value with sampling time of glucose values. Permitted values are 5 and 15 minutes. Default value of 5 minutes.

df

Character value with the format of variable date. Permitted values are yyyy/mm/dd and dd/mm/yyyy. Default value is yyyy/mm/dd.

tf

Character value with the format of variable time. Permitted values are hh:mm:ss and hh:mm. Default value is hh:mm:ss.

all

Logical value for showing all columns of data frame (TRUE) or only columns for variables date, time and glucose (FALSE). Default value is FALSE.

type

Character value to control the different types of prerpocessing. To preserve time slots use normal. For round time slots to 5 or 15 minutes between registers use round. For round time to slots 5 or 15 minutes between registers and complete missing time slots use complete. Default value is normal.

Value

A data frame containing date, time, glucose values and all other variables from the original data-set.

Author(s)

Sergio Contador.

See Also

datagvp4

Examples

data("datagvp4")
preprocessgvp(datagvp4)

percentage spent below/above the target range

Description

Percentage spent below/above the target range is an average measure of glycemia that calculates the percentage of average time that the patient is in hypoglycemic and hyperglycemic ranges. This measure calculates the time-in-range measure (npstr) but does not give more weight to extremely low values (lpstr) nor to high values (hpstr). Arbitrary target range may not be optimal, so the ranges must to be chosen careful.

Usage

pstrgvp(x, t = 24, tdown = 70, tup = 180)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation in [mg/dl].

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

tdown

Numeric value with target range low. Default value of 70 [mg/dl].

tup

Numeric value with target range high. Default value of 180 [mg/dl].

Value

A data frame containing the lpstr, hpstr, npstr and pstr values.

Author(s)

Sergio Contador.

References

Gabor Marics, Zsofia Lendvai, Csaba Lodi, Levente Koncz, David Zakarias, Gyorgy Schuster, Borbala Mikos, Csaba Hermann, Attila J. Szabo, and Peter Toth-Heyn. Evaluation of an open access software for calculating glucose variability parameters of a continuous glucose monitoring system applied at pediatric intensive care unit. BioMedical Engineering OnLine, 14(1):37, Apr 2015.

Examples

data("datagvp1")
pstrgvp(datagvp1)

standard deviation

Description

Standard deviation is a measure of glycemic variability that quantify the amount of variation or dispersion of a set of data values.

Usage

sdgvp(x, t = 24)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation.

t

Numeric value with interval for calculating the measurement. Permitted values are 4, 6, 8, 12 and 24 hours. Default value of 24 hours.

Value

A data frame containing the sd values.

Author(s)

Sergio Contador.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988). The New S Language. Wadsworth & Brooks/Cole.

See Also

cvgvp(x, t = 24)

Examples

data("datagvp1")
sdgvp(datagvp1)

information about data-set

Description

Generic function for printing information about data-set. Includes information about number of days of data, number of registers, number of glucose values, number of glucose values with NA (missing values) and range of glucose values. It shows the absolute values and the relative values for each day, containing the year, month, day and time.

Usage

strgvp(x)

Arguments

x

Data-set with data frame format containing three columns:

date: date of the observation with format yyyy/mm/dd.

time: time of the observation with 24 hour format hh:mm:ss.

glucose: glucose value of the observation.

Value

A list containing the absolute values and the relative values for each day with the information of the data-set.

Author(s)

Sergio Contador.

Examples

data("datagvp1")
strgvp(datagvp1)

change units of glucose values

Description

Generic function for changing units of glucose values from [mmol/l] to [mg/dl].

Usage

unitsgvp(x)

Arguments

x

Data-set with data frame format containing one column:

glucose: glucose value in [mmol/l].

Value

A data frame containing glucose values.

Author(s)

Sergio Contador.