Description Usage Arguments Details Value Examples
The function plot_glu supports several plotting methods for both single and multiple subject data.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
data |
DataFrame with column names ("id", "time", and "gl"). |
plottype |
String corresponding to the desired plot type. Options are 'tsplot' for a time series plot and 'lasagna' for a lasagna plot. See the ‘lasagnatype' parameter for further options corresponding to the ’lasagna' 'plottype'. Default is 'tsplot'. |
datatype |
String corresponding to data aggregation used for plotting, currently supported options are 'all' which plots all glucose measurements within the first |
lasagnatype |
String corresponding to plot type when using |
LLTR |
Lower Limit of Target Range, default value is 70 mg/dL. |
ULTR |
Upper Limit of Target Range, default value is 180 mg/dL. |
subjects |
String or list of strings corresponding to subject names in 'id' column of data. Default is all subjects. |
inter_gap |
The maximum allowable gap (in minutes). Gaps larger than this will not be connected in the time series plot. The default value is 45 minutes. |
tz |
A character string specifying the time zone to be used. System-specific (see |
color_scheme |
String corresponding to the chosen color scheme when the ‘plottype' is ’lasagna'. By default, 'blue-red' scheme is used, with the values below ‘LLTR' colored in shades of blue, and values above 'ULTR' colored in shades of red. The alternative ’red-orange' scheme mimics AGP output from |
log |
Logical value indicating whether log10 of glucose values should be taken, default value is FALSE. When log = TRUE, the glucose values, LLTR, and ULTR will all be log transformed, and time series plots will be on a semilogarithmic scale. |
For the default option 'tsplot', a time series graph for each subject is produced with hypo- and hyperglycemia cutoffs shown as horizontal red lines. The time series plots for all subjects chosen (all by default) are displayed on a grid.
The 'lasagna' plot type works best when the datatype argument is set to average.
Any output from the plot object
1 2 3 4 5 6 7 | data(example_data_1_subject)
plot_glu(example_data_1_subject)
data(example_data_5_subject)
plot_glu(example_data_5_subject, subjects = 'Subject 2')
plot_glu(example_data_5_subject, plottype = 'tsplot', tz = 'EST', LLTR = 70, ULTR = 150)
plot_glu(example_data_5_subject, plottype = 'lasagna', lasagnatype = 'timesorted')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.