preprocessgvp {gluvarpro} | R Documentation |
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)