Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 954 Bytes

File metadata and controls

24 lines (16 loc) · 954 Bytes

MAG

(length(na.omit(idx_gl))*n/60) has to be

    diffs = abs(diff(idx_gl))
    mag = sum(diffs, na.rm = TRUE)/
      (length(na.omit(diffs))*n/60)

AUC

        day = rep(data_ip[[2]], 1440/dt0),

Generate sequence of days repeated 1440/dt0, while it has to have each day repeated by 1440/dt0 and followed by the next

CGMS2DayByDay

ndays = ceiling(as.double(difftime(max(tr), min(tr), units = "days")) + 1) has to be ndays = ceiling(as.double(difftime(max(tr), min(tr), units = "days")))`

grid omits the first measurement of input data and shift timeline -dt0 dti_cum = cumsum(dti) has to be dti_cum = c(0,cumsum(dti))