st_dev {rGV} | R Documentation |
Calculate standard deviation (SD)
Description
Calculate standard deviation (SD)
Usage
st_dev(x, times, overall = TRUE, interval = 1)
Arguments
x |
vector of glucose readings |
times |
vector of corresponding times, in minutes |
overall |
a logical, equal to TRUE you want the CV for the entire dataset, or equal to FALSE if you would prefer many CV values over a moving window |
interval |
size (in hours) of the moving window to be used if overall is false. Null value is 1. |
Value
Either a numeric standard deviation over the entire dataset or a vector of SD values over windows of the data.
Examples
st_dev(x=c(rep(100, 10), rep(120, 10), 105, 85), times=seq(0, 1260, 60), overall=TRUE)
[Package rGV version 0.0.4 Index]