Skip to content

Conversation

@neokok
Copy link
Contributor

@neokok neokok commented Jun 17, 2025

No description provided.

Copy link
Owner

@irinagain irinagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see commens here and on slack

#' the sum of the absolute change in glucose. The sum is then divided by \eqn{\Delta t},
#' the total number of n-minute intervals (default n = 60 for hourly change).
#'
#' @author Elizabeth Chun
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add yourself as author

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also double-check that we indeed agreed that n=60 is the right default

mag = sum(abs(diff(idx_gl)), na.rm = TRUE)/
(length(na.omit(idx_gl))*n/60)
diffs = diff(as.vector(t(data_ip[[1]])))
total_time = (length(na.omit(diffs))*dt0)/n
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if total_time is in hours, then n should always be 60. if n is less than 60, then I am not sure the logic is appropriate. The original code was specifically taking differences over an interval controlled by n. THe new code will always take consecutive differences so this control is eliminated. Better to stick to the original code, but modify for NA

@neokok neokok closed this Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants