tests/testthat/_problems/test-06_conversions_iglu-72.R

# Extracted from test-06_conversions_iglu.R:72

# setup ------------------------------------------------------------------------
library(testthat)
test_env <- simulate_test_env(package = "aidR", path = "..")
attach(test_env, warn.conflicts = FALSE)

# test -------------------------------------------------------------------------
path_1 <- system.file("extdata", "tidepool_example.xlsx", package = "aidR")
path_2 <- system.file("extdata", "carelink_example.csv", package = "aidR")
data <- merge_all(list("1" = parse_data(id = "1", paths = path_1),
                         "2" = parse_data(id = "2", paths = path_2)))
converted <- get_iglu_format(data)
expect_equal(names(converted), c("id", "time", "gl"))
expect_equal(nrow(converted), nrow(data$cgm))

Try the aidR package in your browser

Any scripts or data that you put into this service are public.

aidR documentation built on Oct. 28, 2026, 5:13 p.m.